pgsql: Fix overly strict Assert in jsonpath code - Mailing list pgsql-committers

From David Rowley
Subject pgsql: Fix overly strict Assert in jsonpath code
Date
Msg-id E1qQpbk-0008eR-9l@gemulon.postgresql.org
Whole thread Raw
List 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(-)


pgsql-committers by date:

Previous
From: Noah Misch
Date:
Subject: pgsql: Remove PushOverrideSearchPath() and PopOverrideSearchPath().
Next
From: David Rowley
Date:
Subject: pgsql: Fix overly strict Assert in jsonpath code