summaryrefslogtreecommitdiff
path: root/src/backend/tcop/pquery.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-06-27 02:51:40 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-06-27 02:51:40 +0000
commit3f50ba27cf417eb57fd310c2a88f76a6ea6b966e (patch)
treee9dec4aaac793ed8efab65488e62532057f91704 /src/backend/tcop/pquery.c
parentfe491fb9afd07f3cc9b8aabb17f43049b79258a9 (diff)
downloadpostgresql-3f50ba27cf417eb57fd310c2a88f76a6ea6b966e.tar.gz
Create infrastructure for 'MinimalTuple' representation of in-memory
tuples with less header overhead than a regular HeapTuple, per my recent proposal. Teach TupleTableSlot code how to deal with these. As proof of concept, change tuplestore.c to store MinimalTuples instead of HeapTuples. Future patches will expand the concept to other places where it is useful.
Diffstat (limited to 'src/backend/tcop/pquery.c')
-rw-r--r--src/backend/tcop/pquery.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/backend/tcop/pquery.c b/src/backend/tcop/pquery.c
index 060ce56792..c79d0eae18 100644
--- a/src/backend/tcop/pquery.c
+++ b/src/backend/tcop/pquery.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/tcop/pquery.c,v 1.101 2006/03/05 15:58:40 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/tcop/pquery.c,v 1.102 2006/06/27 02:51:39 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -911,21 +911,17 @@ RunFromStore(Portal portal, ScanDirection direction, long count,
for (;;)
{
MemoryContext oldcontext;
- HeapTuple tup;
- bool should_free;
+ bool ok;
oldcontext = MemoryContextSwitchTo(portal->holdContext);
- tup = tuplestore_getheaptuple(portal->holdStore, forward,
- &should_free);
+ ok = tuplestore_gettupleslot(portal->holdStore, forward, slot);
MemoryContextSwitchTo(oldcontext);
- if (tup == NULL)
+ if (!ok)
break;
- ExecStoreTuple(tup, slot, InvalidBuffer, should_free);
-
(*dest->receiveSlot) (slot, dest);
ExecClearTuple(slot);