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: [email protected]
Views: Whole Thread | Raw Message | 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/[email protected]
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().