mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
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.
This commit is contained in:
@ -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:
|
||||
|
Reference in New Issue
Block a user