Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 6bc601b

Browse files
committed
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.
1 parent f0b651a commit 6bc601b

File tree

3 files changed

+281
-52
lines changed

3 files changed

+281
-52
lines changed

src/backend/optimizer/prep/preptlist.c

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/preptlist.c,v 1.27 1999/07/17 20:17:16 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/preptlist.c,v 1.28 1999/08/09 00:51:26 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -45,10 +45,9 @@ preprocess_targetlist(List *tlist,
4545
Index result_relation,
4646
List *range_table)
4747
{
48-
List *expanded_tlist = NIL;
4948
Oid relid = InvalidOid;
50-
List *t_list = NIL;
51-
List *temp = NIL;
49+
List *expanded_tlist;
50+
List *t_list;
5251

5352
if (result_relation >= 1 && command_type != CMD_SELECT)
5453
relid = getrelid(result_relation, range_table);
@@ -61,14 +60,7 @@ preprocess_targetlist(List *tlist,
6160
expanded_tlist = expand_targetlist(tlist, relid, command_type, result_relation);
6261

6362
/* XXX should the fix-opids be this early?? */
64-
/* was mapCAR */
65-
foreach(temp, expanded_tlist)
66-
{
67-
TargetEntry *tle = lfirst(temp);
68-
69-
if (tle->expr)
70-
fix_opid(tle->expr);
71-
}
63+
fix_opids(expanded_tlist);
7264
t_list = copyObject(expanded_tlist);
7365

7466
/* ------------------

0 commit comments

Comments
 (0)