Re: BUG #17480: Assertion failure in parse_relation.c
Richard Guo <guofenglinux@gmail.com>
From: Richard Guo <guofenglinux@gmail.com>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, krking@zju.edu.cn, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2022-05-16T06:39:15Z
Lists: pgsql-bugs
On Sun, May 15, 2022 at 7:29 PM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote: > I find that the check in addRangeTableEntryForValues is dead code, > because both callers pass a NULL Alias. I find no way to give VALUES an > alias directly. This has annoyed me in the past (not a big deal tbh), > but that makes me refrain from suggesting to removing the code. > I have the same finding. For SelectStmt, the VALUES clause always appears inside RangeSubselect, and you can give alias only to the subquery, not the VALUES clause. For InsertStmt, seems you cannot specify an alias for the VALUES clause. Since the only two callers to addRangeTableEntryForValues both pass NULL as Alias, I think we can remove the related codes inside that function. Thanks Richard
Commits
-
Check column list length in XMLTABLE/JSON_TABLE alias
- ba83de8ada5b 11.17 landed
- ade17703def9 12.12 landed
- 94edb85d253e 14.4 landed
- 80656f00f856 13.8 landed
- 16cb7db34f3c 10.22 landed
- 0fbf01120023 15.0 landed