Fix overly strict Assert in jsonpath code
authorDavid Rowley <[email protected]>
Tue, 1 Aug 2023 13:44:31 +0000 (01:44 +1200)
committerDavid Rowley <[email protected]>
Tue, 1 Aug 2023 13:44:31 +0000 (01:44 +1200)
commit668990980f15e204abad3ed015466514483ab7ab
tree0788acd8ef435cac55b07c93b12a93b3e34991ea
parent9edf72aa76441716ce62d1f1787988e160da8115
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.
src/backend/utils/adt/jsonpath.c