pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: SQL/JSON: Respect OMIT QUOTES when RETURNING domains over jsonb
2+ messages / 1 participants
[nested] [flat]

* pgsql: SQL/JSON: Respect OMIT QUOTES when RETURNING domains over jsonb
@ 2024-07-26 07:43  Amit Langote <amitlan@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Amit Langote @ 2024-07-26 07:43 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: SQL/JSON: Respect OMIT QUOTES when RETURNING domains over jsonb
@ 2024-07-26 07:43  Amit Langote <amitlan@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Amit Langote @ 2024-07-26 07:43 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4fc6a555606de003690d46e900339e78214ee363

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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2024-07-26 07:43 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-07-26 07:43 pgsql: SQL/JSON: Respect OMIT QUOTES when RETURNING domains over jsonb Amit Langote <amitlan@postgresql.org>
2024-07-26 07:43 pgsql: SQL/JSON: Respect OMIT QUOTES when RETURNING domains over jsonb Amit Langote <amitlan@postgresql.org>

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