pgsql: SQL/JSON: Fix default ON ERROR behavior for JSON_TABLE

Started by Amit Langotealmost 2 years ago1 messagescomitters
Jump to latest
#1Amit Langote
Langote_Amit_f8@lab.ntt.co.jp

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: /messages/by-id/CACJufxEo4sUjKCYtda0_qt9tazqqKPmF1cqhW9KBOUeJFqQd2g@mail.gmail.com
Backpatch-through: 17

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/bbd4c058a89b1e756eb646af89a4ef90f0df144e

Modified Files
--------------
src/backend/parser/parse_expr.c | 4 ++--
src/backend/utils/adt/ruleutils.c | 2 +-
src/test/regress/expected/sqljson_jsontable.out | 22 ++++++++++++++++++++++
src/test/regress/sql/sqljson_jsontable.sql | 9 +++++++++
4 files changed, 34 insertions(+), 3 deletions(-)