summaryrefslogtreecommitdiff
path: root/src/include/nodes/execnodes.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-10-07 19:27:04 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-10-07 19:27:04 +0000
commit0d115dde82bf368ae0f9755113bd8fd53ac0b64b (patch)
treea6a1b7b4cfcf1b8ecd49ec280898fc678efdd67d /src/include/nodes/execnodes.h
parent059349be0c7fb2bfc1076d70c8307f5e31d8ff59 (diff)
Extend CTE patch to support recursive UNION (ie, without ALL). The
implementation uses an in-memory hash table, so it will poop out for very large recursive results ... but the performance characteristics of a sort-based implementation would be pretty unpleasant too.
Diffstat (limited to 'src/include/nodes/execnodes.h')
-rw-r--r--src/include/nodes/execnodes.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h
index 02c9c8f0566..c10204a9100 100644
--- a/src/include/nodes/execnodes.h
+++ b/src/include/nodes/execnodes.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.189 2008/10/04 21:56:55 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.190 2008/10/07 19:27:04 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -964,6 +964,12 @@ typedef struct RecursiveUnionState
bool intermediate_empty;
Tuplestorestate *working_table;
Tuplestorestate *intermediate_table;
+ /* Remaining fields are unused in UNION ALL case */
+ FmgrInfo *eqfunctions; /* per-grouping-field equality fns */
+ FmgrInfo *hashfunctions; /* per-grouping-field hash fns */
+ MemoryContext tempContext; /* short-term context for comparisons */
+ TupleHashTable hashtable; /* hash table for tuples already seen */
+ MemoryContext tableContext; /* memory context containing hash table */
} RecursiveUnionState;
/* ----------------