git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d5b760e)
Dept of second thoughts: keep aliasp_item in sync with tlistitem.
2017年10月27日 22:16:24 +0000 (18:16 -0400)
2017年10月27日 22:16:24 +0000 (18:16 -0400)
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.


diff --git a/src/backend/parser/parse_relation.c b/src/backend/parser/parse_relation.c
index e89bebfcc324aaa24fe5c14e8cbe6320624d559d..6acc21dfe6a915a2f418eab6595ec760768160a6 100644 (file)
--- a/src/backend/parser/parse_relation.c
+++ b/src/backend/parser/parse_relation.c
@@ -2221,7 +2221,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)
@@ -2237,6 +2236,8 @@ expandRTE(RangeTblEntry *rte, int rtindex, int sublevels_up,
*colvars = lappend(*colvars, varnode);
}
+
+ aliasp_item = lnext(aliasp_item);
}
}
break;
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /