Re: Assert failure in base_yyparse

2025-05-15 Thread Richard Guo
On Thu, May 15, 2025 at 1:20 AM Alvaro Herrera wrote: > On 2025-May-14, Richard Guo wrote: > > Attached is a patch that implements this. It also renames the > > internally used option name and updates the error message. > LGTM. Thanks. I've pushed this patch and backpatched it through v15. I

Re: Assert failure in base_yyparse

2025-05-14 Thread Alvaro Herrera
On 2025-May-14, Richard Guo wrote: > Attached is a patch that implements this. It also renames the > internally used option name and updates the error message. LGTM. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/

Re: Assert failure in base_yyparse

2025-05-14 Thread Richard Guo
On Fri, May 9, 2025 at 6:50 PM Alvaro Herrera wrote: > I agree that blocking the index from using the option name that xmltable > parsing uses internally is okay. Maybe we can rename it to something > like "__pg__is_not_null" or something like that, which would reduce the > chances of troubling p

Re: Assert failure in base_yyparse

2025-05-09 Thread Alvaro Herrera
On 2025-Apr-14, Richard Guo wrote: > 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 t

Re: Assert failure in base_yyparse

2025-05-08 Thread Richard Guo
On Mon, Apr 14, 2025 at 5:45 PM Richard Guo wrote: > 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 valu

Re: Assert failure in base_yyparse

2025-04-14 Thread Richard Guo
On Fri, Mar 28, 2025 at 7:12 PM Евгений Горбанев 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 in

Re: Assert failure in base_yyparse

2025-03-28 Thread Евгений Горбанев
Also, I think IsA is a better choice for checking the node type. Agree, IsA is better. Fixed in the patch. On Fri, Mar 28, 2025 at 6:05 PM Richard Guo wrote: Hmm, I wonder if we should allow the use of the 'is_not_null' keyword in xmltable. According to the doc, it seems that users should d

Re: Assert failure in base_yyparse

2025-03-28 Thread Richard Guo
On Fri, Mar 28, 2025 at 6:05 PM Richard Guo wrote: > Nice catch. Yeah, is_not_null is a valid column option in xmltable. > In you example, the value of the is_not_null option is "|| 'c'", which > is interpreted as an A_Expr. > > I wonder if the value's type should be checked earlier, rather than

Re: Assert failure in base_yyparse

2025-03-28 Thread Richard Guo
On Fri, Mar 28, 2025 at 4:40 PM Евгений Горбанев wrote: > Got an assert failure when fuzzing the raw_parser function. > The query to reproduce: > SELECT xmltable.* FROM xmltest2, LATERAL xmltable('/d/r' PASSING x > COLUMNS a int PATH '' || lower(_path) is_not_null|| 'c'); > > If I understand corre

Assert failure in base_yyparse

2025-03-28 Thread Евгений Горбанев
Hello. Got an assert failure when fuzzing the raw_parser function. The query to reproduce: SELECT xmltable.* FROM xmltest2, LATERAL xmltable('/d/r' PASSING x COLUMNS a int PATH '' || lower(_path) is_not_null|| 'c'); If I understand correctly, is_not_null is considered as a valid keyword in xm