pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Amit Langote <amitlan@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix restriction on specifying KEEP QUOTES in JSON_QUERY()
Date: Mon, 08 Apr 2024 07:15:33 +0000
Message-ID: <E1rtjE5-0015U7-0J@gemulon.postgresql.org> (raw)

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.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/561b74ddb8781f8c0511f6473c51fb51c8c6b087

Modified Files
--------------
src/backend/parser/parse_expr.c                  |  2 +-
src/test/regress/expected/sqljson_jsontable.out  | 13 +++++----
src/test/regress/expected/sqljson_queryfuncs.out | 36 +++++++++++++++---------
src/test/regress/sql/sqljson_jsontable.sql       |  5 ++--
src/test/regress/sql/sqljson_queryfuncs.sql      | 11 ++++----
5 files changed, 41 insertions(+), 26 deletions(-)



Message-ID: <E1rtjE5-0015U7-0J@gemulon.postgresql.org>
Permalink:  ../E1rtjE5-0015U7-0J@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rtjE5-0015U7-0J@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: amitlan@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Fix restriction on specifying KEEP QUOTES in JSON_QUERY()
  In-Reply-To: <E1rtjE5-0015U7-0J@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox