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/execUtils.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'src/backend/executor/execUtils.c') diff --git a/src/backend/executor/execUtils.c b/src/backend/executor/execUtils.c index 5ab4a5e98fc..5221624fc7d 100644 --- a/src/backend/executor/execUtils.c +++ b/src/backend/executor/execUtils.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/executor/execUtils.c,v 1.128 2005/11/22 18:17:10 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/executor/execUtils.c,v 1.129 2005/11/23 20:27:57 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -435,22 +435,6 @@ ExecAssignResultType(PlanState *planstate, ExecSetSlotDescriptor(slot, tupDesc, shouldFree); } -/* ---------------- - * ExecAssignResultTypeFromOuterPlan - * ---------------- - */ -void -ExecAssignResultTypeFromOuterPlan(PlanState *planstate) -{ - PlanState *outerPlan; - TupleDesc tupDesc; - - outerPlan = outerPlanState(planstate); - tupDesc = ExecGetResultType(outerPlan); - - ExecAssignResultType(planstate, tupDesc, false); -} - /* ---------------- * ExecAssignResultTypeFromTL * ---------------- -- cgit v1.2.3