diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-04-28 19:54:29 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-04-28 19:54:29 +0000 |
commit | 6c5988694218a62c6bc90fc625cbc64f732520cc (patch) | |
tree | cdc64472760a6ecbf73e2334bf23ae0767bf2f21 /src/backend/nodes/copyfuncs.c | |
parent | c8996f9c6bd82765849da85a9cde5de27f8cae79 (diff) | |
download | postgresql-6c5988694218a62c6bc90fc625cbc64f732520cc.tar.gz postgresql-6c5988694218a62c6bc90fc625cbc64f732520cc.zip |
Second try at fixing join alias variables. Instead of attaching miscellaneous
lists to join RTEs, attach a list of Vars and COALESCE expressions that will
replace the join's alias variables during planning. This simplifies
flatten_join_alias_vars while still making it easy to fix up varno references
when transforming the query tree. Add regression test cases for interactions
of subqueries with outer joins.
Diffstat (limited to 'src/backend/nodes/copyfuncs.c')
-rw-r--r-- | src/backend/nodes/copyfuncs.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c index ac25cd52295..c461f147ef8 100644 --- a/src/backend/nodes/copyfuncs.c +++ b/src/backend/nodes/copyfuncs.c @@ -15,7 +15,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.181 2002/04/24 02:48:54 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.182 2002/04/28 19:54:28 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -323,7 +323,6 @@ CopyJoinFields(Join *from, Join *newnode) { newnode->jointype = from->jointype; Node_Copy(from, newnode, joinqual); - newnode->joinrti = from->joinrti; /* subPlan list must point to subplans in the new subtree, not the old */ if (from->plan.subPlan != NIL) newnode->plan.subPlan = nconc(newnode->plan.subPlan, @@ -1475,10 +1474,7 @@ _copyRangeTblEntry(RangeTblEntry *from) newnode->relid = from->relid; Node_Copy(from, newnode, subquery); newnode->jointype = from->jointype; - newnode->joincoltypes = listCopy(from->joincoltypes); - newnode->joincoltypmods = listCopy(from->joincoltypmods); - newnode->joinleftcols = listCopy(from->joinleftcols); - newnode->joinrightcols = listCopy(from->joinrightcols); + Node_Copy(from, newnode, joinaliasvars); Node_Copy(from, newnode, alias); Node_Copy(from, newnode, eref); newnode->inh = from->inh; |