diff options
author | Alexander Korotkov <akorotkov@postgresql.org> | 2019-06-19 22:40:58 +0300 |
---|---|---|
committer | Alexander Korotkov <akorotkov@postgresql.org> | 2019-06-19 22:41:57 +0300 |
commit | 261a5c1928566f938cbda0f62dc16f6a2d1e871d (patch) | |
tree | b8c8f249ab1d48bfa0bfe7b7b0d278f0ff572565 /src/backend/utils/adt/jsonpath.c | |
parent | d8594d123c155aeecd47fc2450f62f5100b2fbf0 (diff) | |
download | postgresql-261a5c1928566f938cbda0f62dc16f6a2d1e871d.tar.gz postgresql-261a5c1928566f938cbda0f62dc16f6a2d1e871d.zip |
Support 'q' flag in jsonpath 'like_regex' predicate
SQL/JSON standard defines that jsonpath 'like_regex' predicate should support
the same set of flags as XQuery/XPath. It appears that implementation of 'q'
flag was missed. This commit fixes that.
Discussion: https://postgr.es/m/CAPpHfdtyfPsxLYiTjp5Ov8T5xGsB5t3CwE5%2B3PS%3DLLwA%2BxTJog%40mail.gmail.com
Author: Nikita Glukhov, Alexander Korotkov
Diffstat (limited to 'src/backend/utils/adt/jsonpath.c')
-rw-r--r-- | src/backend/utils/adt/jsonpath.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/backend/utils/adt/jsonpath.c b/src/backend/utils/adt/jsonpath.c index d5da1558670..87ae60e490f 100644 --- a/src/backend/utils/adt/jsonpath.c +++ b/src/backend/utils/adt/jsonpath.c @@ -563,6 +563,8 @@ printJsonPathItem(StringInfo buf, JsonPathItem *v, bool inKey, appendStringInfoChar(buf, 'm'); if (v->content.like_regex.flags & JSP_REGEX_WSPACE) appendStringInfoChar(buf, 'x'); + if (v->content.like_regex.flags & JSP_REGEX_QUOTE) + appendStringInfoChar(buf, 'q'); appendStringInfoChar(buf, '"'); } |