agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Alexander Korotkov <akorotkov@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Revert cascading of JSON_TABLE's ON ERROR
Date: Tue, 14 Jul 2026 22:31:12 +0000
Message-ID: <E1wjlei-000CeV-05@gemulon.postgresql.org> (raw)
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@linux.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(-)
Message-ID: <E1wjlei-000CeV-05@gemulon.postgresql.org>
Permalink: ../E1wjlei-000CeV-05@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1wjlei-000CeV-05@gemulon.postgresql.org
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: akorotkov@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Revert cascading of JSON_TABLE's ON ERROR
In-Reply-To: <E1wjlei-000CeV-05@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox