aboutsummaryrefslogtreecommitdiff
path: root/src/backend/optimizer/prep/preptlist.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>1999-08-09 00:51:26 +0000
committerTom Lane <tgl@sss.pgh.pa.us>1999-08-09 00:51:26 +0000
commit6bc601b6482f3d71701a40a6b19cbb2e380f297c (patch)
treeb6c0575dc68e88d195167f0eca771c58c1cd0d8e /src/backend/optimizer/prep/preptlist.c
parentf0b651ac6b5551cced05d5653807c821fbdda3cd (diff)
downloadpostgresql-6bc601b6482f3d71701a40a6b19cbb2e380f297c.tar.gz
postgresql-6bc601b6482f3d71701a40a6b19cbb2e380f297c.zip
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.
Diffstat (limited to 'src/backend/optimizer/prep/preptlist.c')
-rw-r--r--src/backend/optimizer/prep/preptlist.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/backend/optimizer/prep/preptlist.c b/src/backend/optimizer/prep/preptlist.c
index 035d6fe6bb3..ac0223879dd 100644
--- a/src/backend/optimizer/prep/preptlist.c
+++ b/src/backend/optimizer/prep/preptlist.c
@@ -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);
/* ------------------