SQL/JSON: Fix default ON ERROR behavior for JSON_TABLE
Amit Langote <amitlan@postgresql.org>
SQL/JSON: Fix default ON ERROR behavior for JSON_TABLE Use EMPTY ARRAY instead of EMPTY. This change does not affect the runtime behavior of JSON_TABLE(), which continues to return an empty relation ON ERROR. It only alters whether the default ON ERROR behavior is shown in the deparsed output. Reported-by: Jian He <jian.universality@gmail.com> Discussion: https://postgr.es/m/CACJufxEo4sUjKCYtda0_qt9tazqqKPmF1cqhW9KBOUeJFqQd2g@mail.gmail.com Backpatch-through: 17
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/parser/parse_expr.c | modified | +2 −2 |
| src/backend/utils/adt/ruleutils.c | modified | +1 −1 |
| src/test/regress/expected/sqljson_jsontable.out | modified | +22 −0 |
| src/test/regress/sql/sqljson_jsontable.sql | modified | +9 −0 |
Discussion
- Re: pgsql: Add more SQL/JSON constructor functions 47 messages · 2024-05-27 → 2024-09-06