Skip to content

Commit e06b9e9

Browse files
committed
Dept of second thoughts: keep aliasp_item in sync with tlistitem.
Commit d5b760e 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.
1 parent 9d15b8b commit e06b9e9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/backend/parser/parse_relation.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1725,7 +1725,6 @@ expandRTE(RangeTblEntry *rte, int rtindex, int sublevels_up,
17251725
char *label = strVal(lfirst(aliasp_item));
17261726

17271727
*colnames = lappend(*colnames, makeString(pstrdup(label)));
1728-
aliasp_item = lnext(aliasp_item);
17291728
}
17301729

17311730
if (colvars)
@@ -1741,6 +1740,8 @@ expandRTE(RangeTblEntry *rte, int rtindex, int sublevels_up,
17411740

17421741
*colvars = lappend(*colvars, varnode);
17431742
}
1743+
1744+
aliasp_item = lnext(aliasp_item);
17441745
}
17451746
}
17461747
break;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy