pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: SQL/JSON: Fix error-handling of some JsonBehavior expressions
2+ messages / 1 participants
[nested] [flat]

* pgsql: SQL/JSON: Fix error-handling of some JsonBehavior expressions
@ 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: 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(-)



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

* pgsql: SQL/JSON: Fix error-handling of some JsonBehavior expressions
@ 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: 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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/63e6c5f4a2eeb22e0dd446a62c2b4b417d2b51f0

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



^ 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: Fix error-handling of some JsonBehavior expressions Amit Langote <amitlan@postgresql.org>
2024-07-26 07:43 pgsql: SQL/JSON: Fix error-handling of some JsonBehavior expressions 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