|
8 | 8 | * |
9 | 9 | * |
10 | 10 | * IDENTIFICATION |
11 | | - * $PostgreSQL: pgsql/src/backend/executor/execJunk.c,v 1.48 2005/03/16 21:38:06 tgl Exp $ |
| 11 | + * $PostgreSQL: pgsql/src/backend/executor/execJunk.c,v 1.49 2005/04/06 16:34:04 tgl Exp $ |
12 | 12 | * |
13 | 13 | *------------------------------------------------------------------------- |
14 | 14 | */ |
|
31 | 31 | * of some system attributes like "ctid" or rule locks. |
32 | 32 | * |
33 | 33 | * The general idea is the following: A target list consists of a list of |
34 | | - * Resdom nodes & expression pairs. Each Resdom node has an attribute |
35 | | - * called 'resjunk'. If the value of this attribute is true then the |
| 34 | + * TargetEntry nodes containing expressions. Each TargetEntry has a field |
| 35 | + * called 'resjunk'. If the value of this field is true then the |
36 | 36 | * corresponding attribute is a "junk" attribute. |
37 | 37 | * |
38 | 38 | * When we initialize a plan we call 'ExecInitJunkFilter' to create |
@@ -101,11 +101,10 @@ ExecInitJunkFilter(List *targetList, bool hasoid, TupleTableSlot *slot) |
101 | 101 | foreach(t, targetList) |
102 | 102 | { |
103 | 103 | TargetEntry *tle = lfirst(t); |
104 | | - Resdom *resdom = tle->resdom; |
105 | 104 |
|
106 | | - if (!resdom->resjunk) |
| 105 | + if (!tle->resjunk) |
107 | 106 | { |
108 | | - cleanMap[cleanResno - 1] = resdom->resno; |
| 107 | + cleanMap[cleanResno - 1] = tle->resno; |
109 | 108 | cleanResno++; |
110 | 109 | } |
111 | 110 | } |
@@ -177,12 +176,11 @@ ExecInitJunkFilterConversion(List *targetList, |
177 | 176 | for (;;) |
178 | 177 | { |
179 | 178 | TargetEntry *tle = lfirst(t); |
180 | | - Resdom *resdom = tle->resdom; |
181 | 179 |
|
182 | 180 | t = lnext(t); |
183 | | - if (!resdom->resjunk) |
| 181 | + if (!tle->resjunk) |
184 | 182 | { |
185 | | - cleanMap[i] = resdom->resno; |
| 183 | + cleanMap[i] = tle->resno; |
186 | 184 | break; |
187 | 185 | } |
188 | 186 | } |
@@ -228,13 +226,12 @@ ExecGetJunkAttribute(JunkFilter *junkfilter, |
228 | 226 | foreach(t, junkfilter->jf_targetList) |
229 | 227 | { |
230 | 228 | TargetEntry *tle = lfirst(t); |
231 | | - Resdom *resdom = tle->resdom; |
232 | 229 |
|
233 | | - if (resdom->resjunk && resdom->resname && |
234 | | - (strcmp(resdom->resname, attrName) == 0)) |
| 230 | + if (tle->resjunk && tle->resname && |
| 231 | + (strcmp(tle->resname, attrName) == 0)) |
235 | 232 | { |
236 | 233 | /* We found it ! */ |
237 | | - *value = slot_getattr(slot, resdom->resno, isNull); |
| 234 | + *value = slot_getattr(slot, tle->resno, isNull); |
238 | 235 | return true; |
239 | 236 | } |
240 | 237 | } |
|
0 commit comments