mirror of
https://github.com/postgres/postgres.git
synced 2025-06-27 23:21:58 +03:00
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.
This commit is contained in:
@ -4300,7 +4300,7 @@ transformJsonFuncExpr(ParseState *pstate, JsonFuncExpr *func)
|
||||
|
||||
/* OMIT QUOTES is meaningless when strings are wrapped. */
|
||||
if (func->op == JSON_QUERY_OP &&
|
||||
func->quotes != JS_QUOTES_UNSPEC &&
|
||||
func->quotes == JS_QUOTES_OMIT &&
|
||||
(func->wrapper == JSW_CONDITIONAL ||
|
||||
func->wrapper == JSW_UNCONDITIONAL))
|
||||
ereport(ERROR,
|
||||
|
Reference in New Issue
Block a user