pgsql: SQL/JSON: Respect OMIT QUOTES when RETURNING domains over jsonb - Mailing list pgsql-committers

From Amit Langote
Subject pgsql: SQL/JSON: Respect OMIT QUOTES when RETURNING domains over jsonb
Date
Msg-id E1sXFbt-001GdA-DQ@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
SQL/JSON: Respect OMIT QUOTES when RETURNING domains over jsonb

populate_domain() didn't take into account the omit_quotes flag passed
down to json_populate_type() by ExecEvalJsonCoercion() and that led
to incorrect behavior when the RETURNING type is a domain over
jsonb.  Fix that by passing the flag by adding a new function
parameter to populate_domain().

Reported-by: Jian He <jian.universality@gmail.com>
Discussion: https://postgr.es/m/CACJufxEo4sUjKCYtda0_qt9tazqqKPmF1cqhW9KBOUeJFqQd2g@mail.gmail.com
Backpatch-through: 17

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/3c3ccd4ca80136939abf97a7c19b67486dfda3af

Modified Files
--------------
src/backend/utils/adt/jsonfuncs.c                | 11 ++++++-----
src/test/regress/expected/sqljson_queryfuncs.out | 15 +++++++++++++++
src/test/regress/sql/sqljson_queryfuncs.sql      |  5 +++++
3 files changed, 26 insertions(+), 5 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Doc: fix misleading syntax synopses for targetlists.
Next
From: Amit Langote
Date:
Subject: pgsql: SQL/JSON: Fix error-handling of some JsonBehavior expressions