From 4dd2048a47712732b60f45fd49f4080bfeec95a0 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 23 Nov 2005 20:27:58 +0000 Subject: Get rid of ExecAssignResultTypeFromOuterPlan() and make all plan node types generate their output tuple descriptors from their target lists (ie, using ExecAssignResultTypeFromTL()). We long ago fixed things so that all node types have minimally valid tlists, so there's no longer any good reason to have two different ways of doing it. This change is needed to fix bug reported by Hayden James: the fix of 2005-11-03 to emit the correct column names after optimizing away a SubqueryScan node didn't work if the new top-level plan node used ExecAssignResultTypeFromOuterPlan to generate its tupdesc, since the next plan node down won't have the correct column labels. --- src/backend/executor/nodeHash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/executor/nodeHash.c') diff --git a/src/backend/executor/nodeHash.c b/src/backend/executor/nodeHash.c index c843c2448c0..82f05855e66 100644 --- a/src/backend/executor/nodeHash.c +++ b/src/backend/executor/nodeHash.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/executor/nodeHash.c,v 1.98 2005/11/22 18:17:10 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/executor/nodeHash.c,v 1.99 2005/11/23 20:27:57 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -164,7 +164,7 @@ ExecInitHash(Hash *node, EState *estate) * initialize tuple type. no need to initialize projection info because * this node doesn't do projections */ - ExecAssignResultTypeFromOuterPlan(&hashstate->ps); + ExecAssignResultTypeFromTL(&hashstate->ps); hashstate->ps.ps_ProjInfo = NULL; return hashstate; -- cgit v1.2.3