summaryrefslogtreecommitdiff
path: root/src/include/access/heapam.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-03-14 04:41:13 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-03-14 04:41:13 +0000
commita9b05bdc8330b378cd2df7910ca0beaa500223fa (patch)
tree18be88094b6d17df65925023582e84c34bf152db /src/include/access/heapam.h
parentd1022ce3a1a8b61798028a8fae46e7e458d77cff (diff)
downloadpostgresql-a9b05bdc8330b378cd2df7910ca0beaa500223fa.tar.gz
Avoid O(N^2) overhead in repeated nocachegetattr calls when columns of
a tuple are being accessed via ExecEvalVar and the attcacheoff shortcut isn't usable (due to nulls and/or varlena columns). To do this, cache Datums extracted from a tuple in the associated TupleTableSlot. Also some code cleanup in and around the TupleTable handling. Atsushi Ogawa with some kibitzing by Tom Lane.
Diffstat (limited to 'src/include/access/heapam.h')
-rw-r--r--src/include/access/heapam.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h
index 6fa3bbf455..3b73d5ea8a 100644
--- a/src/include/access/heapam.h
+++ b/src/include/access/heapam.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/heapam.h,v 1.94 2005/01/27 23:24:11 neilc Exp $
+ * $PostgreSQL: pgsql/src/include/access/heapam.h,v 1.95 2005/03/14 04:41:13 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -40,9 +40,6 @@
* ----------------
*/
-extern Datum nocachegetattr(HeapTuple tup, int attnum,
- TupleDesc att, bool *isnull);
-
#if !defined(DISABLE_COMPLEX_MACRO)
#define fastgetattr(tup, attnum, tupleDesc, isnull) \
@@ -115,9 +112,6 @@ extern Datum fastgetattr(HeapTuple tup, int attnum, TupleDesc tupleDesc,
) \
)
-extern Datum heap_getsysattr(HeapTuple tup, int attnum, TupleDesc tupleDesc,
- bool *isnull);
-
/* ----------------
* function prototypes for heap access method
@@ -191,6 +185,8 @@ extern void DataFill(char *data, TupleDesc tupleDesc,
extern int heap_attisnull(HeapTuple tup, int attnum);
extern Datum nocachegetattr(HeapTuple tup, int attnum,
TupleDesc att, bool *isnull);
+extern Datum heap_getsysattr(HeapTuple tup, int attnum, TupleDesc tupleDesc,
+ bool *isnull);
extern HeapTuple heap_copytuple(HeapTuple tuple);
extern void heap_copytuple_with_tuple(HeapTuple src, HeapTuple dest);
extern HeapTuple heap_formtuple(TupleDesc tupleDescriptor,