Re: Assert failure in base_yyparse

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: Евгений Горбанев <gorbanyoves(at)basealt(dot)ru>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Subject: Re: Assert failure in base_yyparse
Date: 2025-04-14 08:45:16
Message-ID: CAMbWs48aLC3-Z8x=i6qVCc3+=OVebyCVv+HdFS82HOtBH-8kxw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Mar 28, 2025 at 7:12 PM Евгений Горбанев <gorbanyoves(at)basealt(dot)ru> wrote:
> If you replace is_not_null with NOT NULL in the query, everything works
> correctly.
> It seems that is_not_null is an incorrect keyword and it should not be
> used, but I don't understand how it gets here.

It seems what happens is that internally in gram.y (~line 14274), the
DefElem for the not-null option is assigned the name "is_not_null".
As a result, this allows users to explicitly use "is_not_null" as the
option name. However, the value provided for the is_not_null option
in this way might not be a Boolean as expected, which triggers the
assertion.

I kind of doubt we should allow the use of the "is_not_null" keyword
in the xmltable function.

Hi Álvaro, what do you think about this?

Thanks
Richard

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2025-04-14 08:58:59 Re: Changing shared_buffers without restart
Previous Message Daria Shanina 2025-04-14 08:24:20 rounding_up