From a64846f3ada1a4ecc6ca8123777217b3c7781160 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 25 Nov 2003 21:00:54 +0000 Subject: 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. --- src/backend/optimizer/plan/setrefs.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'src/backend/optimizer/plan/setrefs.c') 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: -- cgit v1.2.1