]> git.ipfire.org Git - thirdparty/postgresql.git/commit
SQL/JSON: Fix default ON ERROR behavior for JSON_TABLE
authorAmit Langote <amitlan@postgresql.org>
Fri, 6 Sep 2024 04:25:14 +0000 (13:25 +0900)
committerAmit Langote <amitlan@postgresql.org>
Fri, 6 Sep 2024 04:30:42 +0000 (13:30 +0900)
commit446d5ad7ae7d3bf4fd08904ae54a6399cafb4e7d
tree205cb0f2e3ae314723a17a35b9f06cc81e4b48a7
parentcd680b39211c5c3c88a143abcac576a22f996d7a
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
src/backend/parser/parse_expr.c
src/backend/utils/adt/ruleutils.c
src/test/regress/expected/sqljson_jsontable.out
src/test/regress/sql/sqljson_jsontable.sql