summaryrefslogtreecommitdiff
path: root/src/include/access/heapam.h
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2000-07-02 22:01:27 +0000
committerBruce Momjian <bruce@momjian.us>2000-07-02 22:01:27 +0000
commit80c646958a14ed343a686566cb77bd92961cf589 (patch)
tree1735aa969f6da1c788fac0d733de42b0efb77b03 /src/include/access/heapam.h
parent6fb9d2e347b14445b85d6c97f7d16527d41ccce6 (diff)
Attached is a new patch which addresses this problem. (oids in
regression tests). Chris Bitmead
Diffstat (limited to 'src/include/access/heapam.h')
-rw-r--r--src/include/access/heapam.h67
1 files changed, 36 insertions, 31 deletions
diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h
index ab30f09b308..c716ab23926 100644
--- a/src/include/access/heapam.h
+++ b/src/include/access/heapam.h
@@ -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 */