mirror of
https://github.com/postgres/postgres.git
synced 2026-04-12 04:26:44 -04:00
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.
This commit is contained in:
parent
d1ef5631e6
commit
67f3a697ba
1 changed files with 2 additions and 1 deletions
|
|
@ -982,7 +982,8 @@ jspGetNext(JsonPathItem *v, JsonPathItem *a)
|
|||
v->type == jpiDouble ||
|
||||
v->type == jpiDatetime ||
|
||||
v->type == jpiKeyValue ||
|
||||
v->type == jpiStartsWith);
|
||||
v->type == jpiStartsWith ||
|
||||
v->type == jpiLikeRegex);
|
||||
|
||||
if (a)
|
||||
jspInitByBuffer(a, v->base, v->nextPos);
|
||||
|
|
|
|||
Loading…
Reference in a new issue