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