diff options
Diffstat (limited to 'src/backend/utils/adt/jsonpath_gram.y')
-rw-r--r-- | src/backend/utils/adt/jsonpath_gram.y | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/backend/utils/adt/jsonpath_gram.y b/src/backend/utils/adt/jsonpath_gram.y index de3d97931ef..bd5d4488a06 100644 --- a/src/backend/utils/adt/jsonpath_gram.y +++ b/src/backend/utils/adt/jsonpath_gram.y @@ -583,6 +583,14 @@ jspConvertRegexFlags(uint32 xflags) errmsg("XQuery \"x\" flag (expanded regular expressions) is not implemented"))); } + /* + * We'll never need sub-match details at execution. While + * RE_compile_and_execute would set this flag anyway, force it on here to + * ensure that the regex cache entries created by makeItemLikeRegex are + * useful. + */ + cflags |= REG_NOSUB; + return cflags; } |