mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-06 19:16:55 +02:00
Dept of second thoughts: keep aliasp_item in sync with tlistitem.
Commit d5b760ecb
wasn't quite right, on second thought: if the
caller didn't ask for column names then it would happily emit
more Vars than if the caller did ask for column names. This
is surely not a good idea. Advance the aliasp_item whether or
not we're preparing a colnames list.
This commit is contained in:
parent
7e5e8b36d4
commit
21daada10e
@ -2028,7 +2028,6 @@ expandRTE(RangeTblEntry *rte, int rtindex, int sublevels_up,
|
||||
char *label = strVal(lfirst(aliasp_item));
|
||||
|
||||
*colnames = lappend(*colnames, makeString(pstrdup(label)));
|
||||
aliasp_item = lnext(aliasp_item);
|
||||
}
|
||||
|
||||
if (colvars)
|
||||
@ -2044,6 +2043,8 @@ expandRTE(RangeTblEntry *rte, int rtindex, int sublevels_up,
|
||||
|
||||
*colvars = lappend(*colvars, varnode);
|
||||
}
|
||||
|
||||
aliasp_item = lnext(aliasp_item);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user