From 261a5c1928566f938cbda0f62dc16f6a2d1e871d Mon Sep 17 00:00:00 2001 From: Alexander Korotkov Date: Wed, 19 Jun 2019 22:40:58 +0300 Subject: 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 --- src/backend/utils/adt/jsonpath.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/backend/utils/adt/jsonpath.c') 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, '"'); } -- cgit v1.2.3