SQL/JSON: Improve error-handling of JsonBehavior expressions
Amit Langote <amitlan@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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/executor/execExprInterp.c | modified | +70 −8 |
| src/test/regress/expected/sqljson_jsontable.out | modified | +2 −5 |
| src/test/regress/expected/sqljson_queryfuncs.out | modified | +6 −15 |
Discussion
- Re: pgsql: Add more SQL/JSON constructor functions 47 messages · 2024-05-27 → 2024-09-06