aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeUnique.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-01-10 18:06:05 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-01-10 18:06:05 +0000
commita191a169d6d0b9558da4519e66510c4540204a51 (patch)
treecd32b62bc013145015f4932fef1f7687737205b3 /src/backend/executor/nodeUnique.c
parent5f6d735356c9090d87e184c9322bfe37a165a014 (diff)
downloadpostgresql-a191a169d6d0b9558da4519e66510c4540204a51.tar.gz
postgresql-a191a169d6d0b9558da4519e66510c4540204a51.zip
Change the planner-to-executor API so that the planner tells the executor
which comparison operators to use for plan nodes involving tuple comparison (Agg, Group, Unique, SetOp). Formerly the executor looked up the default equality operator for the datatype, which was really pretty shaky, since it's possible that the data being fed to the node is sorted according to some nondefault operator class that could have an incompatible idea of equality. The planner knows what it has sorted by and therefore can provide the right equality operator to use. Also, this change moves a couple of catalog lookups out of the executor and into the planner, which should help startup time for pre-planned queries by some small amount. Modify the planner to remove some other cavalier assumptions about always being able to use the default operators. Also add "nulls first/last" info to the Plan node for a mergejoin --- neither the executor nor the planner can cope yet, but at least the API is in place.
Diffstat (limited to 'src/backend/executor/nodeUnique.c')
-rw-r--r--src/backend/executor/nodeUnique.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/backend/executor/nodeUnique.c b/src/backend/executor/nodeUnique.c
index 5e0edfb57ba..6d64c3e334b 100644
--- a/src/backend/executor/nodeUnique.c
+++ b/src/backend/executor/nodeUnique.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/executor/nodeUnique.c,v 1.54 2007/01/05 22:19:28 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/executor/nodeUnique.c,v 1.55 2007/01/10 18:06:02 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -159,9 +159,8 @@ ExecInitUnique(Unique *node, EState *estate, int eflags)
* Precompute fmgr lookup data for inner loop
*/
uniquestate->eqfunctions =
- execTuplesMatchPrepare(ExecGetResultType(&uniquestate->ps),
- node->numCols,
- node->uniqColIdx);
+ execTuplesMatchPrepare(node->numCols,
+ node->uniqOperators);
return uniquestate;
}