Re: BUG #17480: Assertion failure in parse_relation.c - Mailing list pgsql-bugs

From Richard Guo
Subject Re: BUG #17480: Assertion failure in parse_relation.c
Date
Msg-id CAMbWs49N+e-7=v=oak-0zDcOeGsggdm7AtB6nEA-JtG4uCF9CA@mail.gmail.com
Whole thread Raw
In response to Re: BUG #17480: Assertion failure in parse_relation.c  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List 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

pgsql-bugs by date:

Previous
From: 김범승
Date:
Subject: Regarding postgresql installation on Google Cloud [Error]
Next
From: PG Bug reporting form
Date:
Subject: BUG #17483: postgres_fdw used with text to_tsvector and custom search configuration