From 6c5988694218a62c6bc90fc625cbc64f732520cc Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 28 Apr 2002 19:54:29 +0000 Subject: 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. --- src/backend/nodes/readfuncs.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'src/backend/nodes/readfuncs.c') diff --git a/src/backend/nodes/readfuncs.c b/src/backend/nodes/readfuncs.c index f91ba36e5dc..1d4236fc847 100644 --- a/src/backend/nodes/readfuncs.c +++ b/src/backend/nodes/readfuncs.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.119 2002/04/11 20:00:00 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.120 2002/04/28 19:54:28 tgl Exp $ * * NOTES * Most of the read functions for plan nodes are tested. (In fact, they @@ -421,10 +421,6 @@ _getJoin(Join *node) token = pg_strtok(&length); /* skip the :joinqual */ node->joinqual = nodeRead(true); /* get the joinqual */ - - token = pg_strtok(&length); /* skip the :joinrti */ - token = pg_strtok(&length); /* get the joinrti */ - node->joinrti = atoi(token); } @@ -1523,17 +1519,8 @@ _readRangeTblEntry(void) token = pg_strtok(&length); /* get jointype */ local_node->jointype = (JoinType) atoi(token); - token = pg_strtok(&length); /* eat :joincoltypes */ - local_node->joincoltypes = toOidList(nodeRead(true)); - - token = pg_strtok(&length); /* eat :joincoltypmods */ - local_node->joincoltypmods = toIntList(nodeRead(true)); - - token = pg_strtok(&length); /* eat :joinleftcols */ - local_node->joinleftcols = toIntList(nodeRead(true)); - - token = pg_strtok(&length); /* eat :joinrightcols */ - local_node->joinrightcols = toIntList(nodeRead(true)); + token = pg_strtok(&length); /* eat :joinaliasvars */ + local_node->joinaliasvars = nodeRead(true); /* now read it */ break; default: -- cgit v1.2.3