pgsql: Fix overly strict Assert in jsonpath code

From: David Rowley <drowley(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix overly strict Assert in jsonpath code
Date: 2023-08-01 13:40:17
Message-ID: E1qQpbk-0008eR-9l@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix overly strict Assert in jsonpath code

This was failing for queries which try to get the .type() of a
jpiLikeRegex. For example:

select jsonb_path_query('["string", "string"]',
'($[0] like_regex ".{7}").type()');

Reported-by: Alexander Kozhemyakin
Bug: #18035
Discussion: https://postgr.es/m/18035-64af5cdcb5adf2a9@postgresql.org
Backpatch-through: 12, where SQL/JSON path was added.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/deae1657ee6dd6f7b3effab3d44429d5434f5bbf

Modified Files
--------------
src/backend/utils/adt/jsonpath.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message David Rowley 2023-08-01 13:40:46 pgsql: Fix overly strict Assert in jsonpath code
Previous Message Noah Misch 2023-08-01 00:05:14 pgsql: Remove PushOverrideSearchPath() and PopOverrideSearchPath().