From: | David Rowley <dgrowleyml(at)gmail(dot)com> |
---|---|
To: | a(dot)kozhemyakin(at)postgrespro(dot)ru, pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #18035: Assertion failure in jsonb_path_query |
Date: | 2023-07-25 14:55:51 |
Message-ID: | CAApHDvrZS7tpiSB=XorYJDq4m=BB3uPmwpYzJbKWRDxouOoE1g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Tue, 25 Jul 2023 at 22:01, PG Bug reporting form
<noreply(at)postgresql(dot)org> wrote:
> On REL_16_BETA2 the following query: select jsonb_path_query('{}', '($[0]
> like_regex "").type()');
> produces assert for me:
I'm no json path expert, but from what I can tell, this Assert is just
missing a condition for jpiLikeRegex.
With that added, it seems to properly determine that the regex test
returns boolean.
postgres=# select jsonb_path_query($$["string", "string"]$$, '($[0]
like_regex ".{5}")');
jsonb_path_query
------------------
true
(1 row)
postgres=# select jsonb_path_query($$["string", "string"]$$, '($[0]
like_regex ".{7}")');
jsonb_path_query
------------------
false
(1 row)
postgres=# select jsonb_path_query($$["string", "string"]$$, '($[0]
like_regex ".{7}").type()');
jsonb_path_query
------------------
"boolean"
(1 row)
The only other enum value missing from that Assert is jpiSubscript.
David
Attachment | Content-Type | Size |
---|---|---|
add_missing_jpiLikeRegex_to_assert.patch | text/plain | 518 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2023-07-25 16:27:43 | Re: BUG #18031: Segmentation fault after deadlock within VACUUM's parallel worker |
Previous Message | Alexander Lakhin | 2023-07-25 10:00:00 | Re: BUG #18014: Releasing catcache entries makes schema_to_xmlschema() fail when parallel workers are used |