Fix restriction on specifying KEEP QUOTES in JSON_QUERY()
authorAmit Langote <amitlan@postgresql.org>
Mon, 8 Apr 2024 07:02:29 +0000 (16:02 +0900)
committerAmit Langote <amitlan@postgresql.org>
Mon, 8 Apr 2024 07:02:29 +0000 (16:02 +0900)
commit561b74ddb8781f8c0511f6473c51fb51c8c6b087
tree78603f13636119e93393db6cf67e8b4e4f380583
parentb453a7a16a7ed2ba96522e521143bc652b74875f
Fix restriction on specifying KEEP QUOTES in JSON_QUERY()

Currently, transformJsonFuncExpr() enforces some restrictions on
the combinations of QUOTES and WRAPPER clauses that can be specified
in JSON_QUERY().  The intent was to only prevent the useless
combination WITH WRAPPER OMIT QUOTES, but the coding prevented KEEP
QUOTES too, which is not helpful. Fix that.
src/backend/parser/parse_expr.c
src/test/regress/expected/sqljson_jsontable.out
src/test/regress/expected/sqljson_queryfuncs.out
src/test/regress/sql/sqljson_jsontable.sql
src/test/regress/sql/sqljson_queryfuncs.sql