summaryrefslogtreecommitdiff
path: root/src/include/access/heapam.h
diff options
context:
space:
mode:
authorMarc G. Fournier1998-03-01 04:47:38 +0000
committerMarc G. Fournier1998-03-01 04:47:38 +0000
commit56b3182241347aacb7b4c47519f009ffa2b57aa8 (patch)
treebd6f3caf19abe173617ca8632828f8e0faf4d04f /src/include/access/heapam.h
parent5b3e78afe3b207e5db91853f03a90f37e0fdb35f (diff)
From: "Billy G. Allie" <[email protected]>
The following patches will allow postgreSQL 6.3 to compile and run on a UNIXWARE 2.1.2 system with the native C compiler with the following library change: The alloca function must be copied from the libucb.a archive and added to the libgen.a archive. Also, the GNU flex program is needed to successfully build postgreSQL.
Diffstat (limited to 'src/include/access/heapam.h')
-rw-r--r--src/include/access/heapam.h54
1 files changed, 53 insertions, 1 deletions
diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h
index 7dc25337357..8e322b1d915 100644
--- a/src/include/access/heapam.h
+++ b/src/include/access/heapam.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: heapam.h,v 1.30 1998/02/26 04:40:05 momjian Exp $
+ * $Id: heapam.h,v 1.31 1998/03/01 04:46:56 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@@ -88,6 +88,8 @@ typedef HeapAccessStatisticsData *HeapAccessStatistics;
*
* ----------------
*/
+#if !defined(USE_UNIVEL_CC)
+
#define fastgetattr(tup, attnum, tupleDesc, isnull) \
( \
AssertMacro((attnum) > 0) ? \
@@ -130,7 +132,57 @@ typedef HeapAccessStatisticsData *HeapAccessStatistics;
) \
)
+#else /* !defined(USE_UNIVEL_CC) */
+
+extern Datum nocachegetattr(HeapTuple tup, int attnum,
+ TupleDesc att, bool *isnull);
+
+static 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) + (tup)->t_hoff +
+ (
+ ((attnum) != 1) ?
+ (tupleDesc)->attrs[(attnum)-1]->attcacheoff
+ :
+ 0
+ )
+ )
+ )
+ :
+ nocachegetattr((tup), (attnum), (tupleDesc), (isnull))
+ )
+ :
+ (
+ att_isnull((attnum)-1, (tup)->t_bits) ?
+ (
+ ((isnull) ? (*(isnull) = true) : (dummyret)NULL),
+ (Datum)NULL
+ )
+ :
+ (
+ nocachegetattr((tup), (attnum), (tupleDesc), (isnull))
+ )
+ )
+ )
+ :
+ (
+ (Datum)NULL
+ )
+ );
+}
+#endif
/* ----------------
* heap_getattr