aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/heap/heapam.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/heap/heapam.c')
-rw-r--r--src/backend/access/heap/heapam.c56
1 files changed, 55 insertions, 1 deletions
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index 7ca83587a4d..150005f8fbe 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.72 2000/06/28 03:31:04 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.73 2000/06/30 16:10:40 petere Exp $
*
*
* INTERFACE ROUTINES
@@ -504,6 +504,60 @@ heapgettup(Relation relation,
}
+#if defined(DISABLE_COMPLEX_MACRO)
+/*
+ * This is formatted so oddly so that the correspondence to the macro
+ * definition in access/heapam.h is maintained.
+ */
+Datum
+fastgetattr(HeapTuple tup, int attnum, TupleDesc tupleDesc,
+ bool *isnull)
+{
+ return (
+ (attnum) > 0 ?
+ (
+ ((isnull) ? (*(isnull) = false) : (dummyret) NULL),
+ HeapTupleNoNulls(tup) ?
+ (
+ ((tupleDesc)->attrs[(attnum) - 1]->attcacheoff != -1 ||
+ (attnum) == 1) ?
+ (
+ (Datum) fetchatt(&((tupleDesc)->attrs[(attnum) - 1]),
+ (char *) (tup)->t_data + (tup)->t_data->t_hoff +
+ (
+ ((attnum) != 1) ?
+ (tupleDesc)->attrs[(attnum) - 1]->attcacheoff
+ :
+ 0
+ )
+ )
+ )
+ :
+ nocachegetattr((tup), (attnum), (tupleDesc), (isnull))
+ )
+ :
+ (
+ att_isnull((attnum) - 1, (tup)->t_data->t_bits) ?
+ (
+ ((isnull) ? (*(isnull) = true) : (dummyret) NULL),
+ (Datum) NULL
+ )
+ :
+ (
+ nocachegetattr((tup), (attnum), (tupleDesc), (isnull))
+ )
+ )
+ )
+ :
+ (
+ (Datum) NULL
+ )
+ );
+}
+#endif /* defined(DISABLE_COMPLEX_MACRO)*/
+
+
+
/* ----------------------------------------------------------------
* heap access method interface
* ----------------------------------------------------------------