summaryrefslogtreecommitdiff
path: root/src/backend/optimizer/plan/setrefs.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-11-25 21:00:54 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-11-25 21:00:54 +0000
commita64846f3ada1a4ecc6ca8123777217b3c7781160 (patch)
tree703df98e0295f119b70fc8656d026fdec1592f3c /src/backend/optimizer/plan/setrefs.c
parent38ba28e5c11aa53ccf5b2c4cdb8ab427b42ebca2 (diff)
downloadpostgresql-a64846f3ada1a4ecc6ca8123777217b3c7781160.tar.gz
Get rid of hashkeys field of Hash plan node, since it's redundant with
the hashclauses field of the parent HashJoin. This avoids problems with duplicated links to SubPlans in hash clauses, as per report from Andrew Holm-Hansen.
Diffstat (limited to 'src/backend/optimizer/plan/setrefs.c')
-rw-r--r--src/backend/optimizer/plan/setrefs.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/backend/optimizer/plan/setrefs.c b/src/backend/optimizer/plan/setrefs.c
index ec21c1a8d3..2952e8f077 100644
--- a/src/backend/optimizer/plan/setrefs.c
+++ b/src/backend/optimizer/plan/setrefs.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.97 2003/08/08 21:41:50 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.98 2003/11/25 21:00:54 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -167,24 +167,6 @@ set_plan_references(Plan *plan, List *rtable)
(Node *) ((HashJoin *) plan)->hashclauses);
break;
case T_Hash:
-
- /*
- * Hash does not evaluate its targetlist or quals, so don't
- * touch those (see comments below). But we do need to fix
- * its hashkeys. The hashkeys are a little bizarre because
- * they need to match the hashclauses of the parent HashJoin
- * node, so we use join_references to fix them.
- */
- ((Hash *) plan)->hashkeys =
- join_references(((Hash *) plan)->hashkeys,
- rtable,
- NIL,
- plan->lefttree->targetlist,
- (Index) 0,
- targetlist_has_non_vars(plan->lefttree->targetlist));
- fix_expr_references(plan,
- (Node *) ((Hash *) plan)->hashkeys);
- break;
case T_Material:
case T_Sort:
case T_Unique: