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

* pgsql: SQL/JSON: Improve error-handling of 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: 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
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d1dc4ae5608d9c0e83d5b5d32de238a7ac3d9a1a

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



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

* pgsql: SQL/JSON: Improve error-handling of 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: 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(-)



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