aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-01-18 00:31:53 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-01-18 00:31:53 +0000
commit9933ba3f67d3690b69af7ad65a0e86a09a967b9b (patch)
tree4d0cb96805ad823980cad6e7599d91da35cfb4e2 /src
parent9575c7af6c127baa846368809a25d8f51e4c92e4 (diff)
downloadpostgresql-9933ba3f67d3690b69af7ad65a0e86a09a967b9b.tar.gz
postgresql-9933ba3f67d3690b69af7ad65a0e86a09a967b9b.zip
Repair faulty plan generation in cases where we choose to implement an
IN clause by mergejoin, and a type coercion is needed just above the subplan. A more extensive patch will follow in HEAD.
Diffstat (limited to 'src')
-rw-r--r--src/backend/optimizer/plan/createplan.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c
index 08db46c942a..54827a99fa5 100644
--- a/src/backend/optimizer/plan/createplan.c
+++ b/src/backend/optimizer/plan/createplan.c
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.157.2.1 2003/11/25 19:17:16 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.157.2.2 2004/01/18 00:31:53 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1865,10 +1865,10 @@ make_sort_from_pathkeys(Query *root, Plan *lefttree,
/*
* Do we need to insert a Result node?
*
- * Currently, the only non-projection-capable plan type we can
- * see here is Append.
+ * Currently, the only non-projection-capable plan types we can
+ * see here are Append and Unique.
*/
- if (IsA(lefttree, Append))
+ if (IsA(lefttree, Append) || IsA(lefttree, Unique))
{
tlist = copyObject(tlist);
lefttree = (Plan *) make_result(tlist, NULL, lefttree);