1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-15 19:21:59 +03:00

Create a standardized expression_tree_mutator support routine

to go along with expression_tree_walker.  (_walker is not suitable for
routines that need to alter the tree structure significantly.)  Other minor
cleanups in clauses.c.
This commit is contained in:
Tom Lane
1999-08-09 00:51:26 +00:00
parent f0b651ac6b
commit 6bc601b648
3 changed files with 281 additions and 52 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/preptlist.c,v 1.27 1999/07/17 20:17:16 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/preptlist.c,v 1.28 1999/08/09 00:51:26 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -45,10 +45,9 @@ preprocess_targetlist(List *tlist,
Index result_relation,
List *range_table)
{
List *expanded_tlist = NIL;
Oid relid = InvalidOid;
List *t_list = NIL;
List *temp = NIL;
List *expanded_tlist;
List *t_list;
if (result_relation >= 1 && command_type != CMD_SELECT)
relid = getrelid(result_relation, range_table);
@ -61,14 +60,7 @@ preprocess_targetlist(List *tlist,
expanded_tlist = expand_targetlist(tlist, relid, command_type, result_relation);
/* XXX should the fix-opids be this early?? */
/* was mapCAR */
foreach(temp, expanded_tlist)
{
TargetEntry *tle = lfirst(temp);
if (tle->expr)
fix_opid(tle->expr);
}
fix_opids(expanded_tlist);
t_list = copyObject(expanded_tlist);
/* ------------------