mirror of
https://github.com/postgres/postgres.git
synced 2025-10-25 13:17:41 +03:00
Attached is a new patch which addresses this problem. (oids in
regression tests). Chris Bitmead
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: heapam.h,v 1.54 2000/06/30 16:10:49 petere Exp $
|
||||
* $Id: heapam.h,v 1.55 2000/07/02 22:01:00 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -165,36 +165,41 @@ fastgetattr(HeapTuple tup, int attnum, TupleDesc tupleDesc,
|
||||
*
|
||||
* ----------------
|
||||
*/
|
||||
#define heap_getattr(tup, attnum, tupleDesc, isnull) \
|
||||
( \
|
||||
AssertMacro((tup) != NULL && \
|
||||
(attnum) > FirstLowInvalidHeapAttributeNumber && \
|
||||
(attnum) != 0), \
|
||||
((attnum) > (int) (tup)->t_data->t_natts) ? \
|
||||
( \
|
||||
((isnull) ? (*(isnull) = true) : (dummyret)NULL), \
|
||||
(Datum)NULL \
|
||||
) \
|
||||
: \
|
||||
( \
|
||||
((attnum) > 0) ? \
|
||||
( \
|
||||
fastgetattr((tup), (attnum), (tupleDesc), (isnull)) \
|
||||
) \
|
||||
: \
|
||||
( \
|
||||
((isnull) ? (*(isnull) = false) : (dummyret)NULL), \
|
||||
((attnum) == SelfItemPointerAttributeNumber) ? \
|
||||
( \
|
||||
(Datum)((char *)&((tup)->t_self)) \
|
||||
) \
|
||||
: \
|
||||
( \
|
||||
(Datum)*(unsigned int *) \
|
||||
((char *)(tup)->t_data + heap_sysoffset[-(attnum)-1]) \
|
||||
) \
|
||||
) \
|
||||
) \
|
||||
#define heap_getattr(tup, attnum, tupleDesc, isnull) \
|
||||
( \
|
||||
AssertMacro((tup) != NULL && \
|
||||
(attnum) > FirstLowInvalidHeapAttributeNumber && \
|
||||
(attnum) != 0), \
|
||||
((attnum) > (int) (tup)->t_data->t_natts) ? \
|
||||
( \
|
||||
((isnull) ? (*(isnull) = true) : (dummyret)NULL), \
|
||||
(Datum)NULL \
|
||||
) \
|
||||
: \
|
||||
( \
|
||||
((attnum) > 0) ? \
|
||||
( \
|
||||
fastgetattr((tup), (attnum), (tupleDesc), (isnull)) \
|
||||
) \
|
||||
: \
|
||||
( \
|
||||
((isnull) ? (*(isnull) = false) : (dummyret)NULL), \
|
||||
((attnum) == SelfItemPointerAttributeNumber) ? \
|
||||
( \
|
||||
(Datum)((char *)&((tup)->t_self)) \
|
||||
) \
|
||||
: \
|
||||
(((attnum) == TableOidAttributeNumber) ? \
|
||||
( \
|
||||
(Datum)((tup)->tableOid) \
|
||||
) \
|
||||
: \
|
||||
( \
|
||||
(Datum)*(unsigned int *) \
|
||||
((char *)(tup)->t_data + heap_sysoffset[-(attnum)-1]) \
|
||||
)) \
|
||||
) \
|
||||
) \
|
||||
)
|
||||
|
||||
extern HeapAccessStatistics heap_access_stats; /* in stats.c */
|
||||
|
||||
Reference in New Issue
Block a user