1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-25 13:17:41 +03:00

Fix portability problems recently exposed by regression tests on Alphas.

1. Distinguish cases where a Datum representing a tuple datatype is an OID
from cases where it is a pointer to TupleTableSlot, and make sure we use
the right typlen in each case.
2. Make fetchatt() and related code support 8-byte by-value datatypes on
machines where Datum is 8 bytes.  Centralize knowledge of the available
by-value datatype sizes in two macros in tupmacs.h, so that this will be
easier if we ever have to do it again.
This commit is contained in:
Tom Lane
2000-12-27 23:59:14 +00:00
parent 97799fc475
commit 8609d4abf2
23 changed files with 497 additions and 660 deletions

View File

@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: itup.h,v 1.26 2000/11/30 18:38:46 tgl Exp $
* $Id: itup.h,v 1.27 2000/12/27 23:59:13 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -111,7 +111,7 @@ typedef RetrieveIndexResultData *RetrieveIndexResult;
( \
(tupleDesc)->attrs[(attnum)-1]->attcacheoff >= 0 ? \
( \
(Datum) fetchatt(&((tupleDesc)->attrs[(attnum)-1]), \
fetchatt((tupleDesc)->attrs[(attnum)-1], \
(char *) (tup) + \
( \
IndexTupleHasMinHeader(tup) ? \