SQL/JSON: Respect OMIT QUOTES when RETURNING domains over jsonb
Amit Langote <amitlan@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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/adt/jsonfuncs.c | modified | +6 −5 |
| src/test/regress/expected/sqljson_queryfuncs.out | modified | +15 −0 |
| src/test/regress/sql/sqljson_queryfuncs.sql | modified | +5 −0 |
Discussion
- Re: pgsql: Add more SQL/JSON constructor functions 47 messages · 2024-05-27 → 2024-09-06