From: Amit Langote <amitlan@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: SQL/JSON: Improve error-handling of JsonBehavior expressions
Date: Fri, 26 Jul 2024 07:43:43 +0000
Message-ID: <E1sXFc7-001Ge8-2C@gemulon.postgresql.org> (raw)
SQL/JSON: Improve error-handling of JsonBehavior expressions
Instead of returning a NULL when the JsonBehavior expression value
could not be coerced to the RETURNING type, throw the error message
informing the user that it is the JsonBehavior expression that caused
the error with the actual coercion error message shown in its DETAIL
line.
Discussion: https://postgr.es/m/CACJufxEo4sUjKCYtda0_qt9tazqqKPmF1cqhW9KBOUeJFqQd2g@mail.gmail.com
Backpatch-through: 17
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/231b7d670b218d6a5cde0574cf160c8157ab91fb
Modified Files
--------------
src/backend/executor/execExprInterp.c | 78 +++++++++++++++++++++---
src/test/regress/expected/sqljson_jsontable.out | 7 +--
src/test/regress/expected/sqljson_queryfuncs.out | 21 ++-----
3 files changed, 78 insertions(+), 28 deletions(-)
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: SQL/JSON: Improve error-handling of JsonBehavior expressions
In-Reply-To: <E1sXFc7-001Ge8-2C@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