| From: | Alexander Korotkov <akorotkov(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Revert cascading of JSON_TABLE's ON ERROR |
| Date: | 2026-07-14 22:31:12 |
| Message-ID: | E1wjlei-000CeV-05@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Revert cascading of JSON_TABLE's ON ERROR
86ab7f4c721d commit made the table-level ON ERROR clause serve as the default
ON ERROR for columns lacking their own, so that a top-level ERROR ON ERROR
turned per-column evaluation errors into hard errors.
The SQL standard does mandate this cascade, but introducing it should be
a deliberate, separately-documented change, so restore the previous
behavior for now. This also reverts the paired ruleutils.c logic that
deparsed a column's behavior against an ERROR default: that dropped an
explicit ERROR ON EMPTY from a dumped view, and otherwise emitted a
redundant NULL ON EMPTY.
Reported-by: Thom Brown <thom(at)linux(dot)com>
Discussion: https://postgr.es/m/CAA-aLv7aZGSExnbjJRw8eKkoXbu34TdoKLLA2gPye3aHjO5OSA@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/af6fad879fbf9b542cfde05c52695c9dffa6bb47
Modified Files
--------------
src/backend/parser/parse_jsontable.c | 13 +++---------
src/backend/utils/adt/ruleutils.c | 4 ----
src/test/regress/expected/sqljson_jsontable.out | 27 ++++++++++++++++++++++++-
src/test/regress/sql/sqljson_jsontable.sql | 15 ++++++++++++++
4 files changed, 44 insertions(+), 15 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alexander Korotkov | 2026-07-14 22:59:41 | pgsql: postgres_fdw: don't push down non-relabeling ArrayCoerceExpr |
| Previous Message | noreply | 2026-07-14 20:36:44 | pgsql: Tag refs/tags/REL_19_BETA2 was created |