Re: BUG #17480: Assertion failure in parse_relation.c

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, krking(at)zju(dot)edu(dot)cn, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #17480: Assertion failure in parse_relation.c
Date: 2022-05-16 06:39:15
Message-ID: CAMbWs49N+e-7=v=oak-0zDcOeGsggdm7AtB6nEA-JtG4uCF9CA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Sun, May 15, 2022 at 7:29 PM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2022-05-16 09:25:01 BUG #17483: postgres_fdw used with text to_tsvector and custom search configuration
Previous Message 김범승 2022-05-16 06:02:57 Regarding postgresql installation on Google Cloud [Error]