From cc77005df7177d9af1c23b7af1cac08102fcbca9 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 22 Feb 2007 23:44:25 +0000 Subject: Change Agg and Group nodes so that Vars contained in their targetlists and quals have varno OUTER, rather than zero, to indicate a reference to an output of their lefttree subplan. This is consistent with the way that every other upper-level node type does it, and allows some simplifications in setrefs.c and EXPLAIN. --- src/backend/executor/nodeResult.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/backend/executor/nodeResult.c') diff --git a/src/backend/executor/nodeResult.c b/src/backend/executor/nodeResult.c index 98e9d219727..5ea5132dd22 100644 --- a/src/backend/executor/nodeResult.c +++ b/src/backend/executor/nodeResult.c @@ -38,7 +38,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/executor/nodeResult.c,v 1.39 2007/02/16 03:49:04 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/executor/nodeResult.c,v 1.40 2007/02/22 23:44:25 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -132,13 +132,11 @@ ExecResult(ResultState *node) if (TupIsNull(outerTupleSlot)) return NULL; - node->ps.ps_OuterTupleSlot = outerTupleSlot; - /* - * XXX gross hack. use outer tuple as scan tuple for projection + * prepare to compute projection expressions, which will expect + * to access the input tuples as varno OUTER. */ econtext->ecxt_outertuple = outerTupleSlot; - econtext->ecxt_scantuple = outerTupleSlot; } else { -- cgit v1.2.3