mirror of
https://github.com/postgres/postgres.git
synced 2025-10-24 01:29:19 +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 */
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: htup.h,v 1.30 2000/06/02 10:20:26 vadim Exp $
|
||||
* $Id: htup.h,v 1.31 2000/07/02 22:01:00 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -133,7 +133,8 @@ typedef struct xl_heap_move
|
||||
#define MinCommandIdAttributeNumber (-4)
|
||||
#define MaxTransactionIdAttributeNumber (-5)
|
||||
#define MaxCommandIdAttributeNumber (-6)
|
||||
#define FirstLowInvalidHeapAttributeNumber (-7)
|
||||
#define TableOidAttributeNumber (-7)
|
||||
#define FirstLowInvalidHeapAttributeNumber (-8)
|
||||
|
||||
/* If you make any changes above, the order off offsets in this must change */
|
||||
extern long heap_sysoffset[];
|
||||
@@ -156,6 +157,7 @@ typedef struct HeapTupleData
|
||||
{
|
||||
uint32 t_len; /* length of *t_data */
|
||||
ItemPointerData t_self; /* SelfItemPointer */
|
||||
Oid tableOid; /* */
|
||||
MemoryContext t_datamcxt; /* */
|
||||
HeapTupleHeader t_data; /* */
|
||||
} HeapTupleData;
|
||||
|
||||
Reference in New Issue
Block a user