From: Amit Langote <amitlan@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: SQL/JSON: Fix error-handling of some JsonBehavior expressions
Date: Fri, 26 Jul 2024 07:43:29 +0000
Message-ID: <E1sXFbt-001Gd6-CL@gemulon.postgresql.org> (raw)
SQL/JSON: Fix error-handling of some JsonBehavior expressions
To ensure that the errors of executing a JsonBehavior expression that
is coerced in the parser are caught instead of being thrown directly,
pass ErrorSaveContext to ExecInitExprRec() when initializing it.
Also, add a EEOP_JSONEXPR_COERCION_FINISH step to handle the errors
that are caught that way.
Discussion: https://postgr.es/m/CACJufxEo4sUjKCYtda0_qt9tazqqKPmF1cqhW9KBOUeJFqQd2g@mail.gmail.com
Backpatch-through: 17
Branch
------
REL_17_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/79fa052e78804667739bee3f3e220f0ef6783b2c
Modified Files
--------------
src/backend/executor/execExpr.c | 51 +++++++++++++++++++++++-
src/backend/executor/execExprInterp.c | 6 +++
src/test/regress/expected/sqljson_jsontable.out | 6 ++-
src/test/regress/expected/sqljson_queryfuncs.out | 6 ++-
4 files changed, 65 insertions(+), 4 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: Fix error-handling of some JsonBehavior expressions
In-Reply-To: <E1sXFbt-001Gd6-CL@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