postgresql/src
Amit Langote c88ce386c4 SQL/JSON: Fix JSON_TABLE() column deparsing
The deparsing code in get_json_expr_options() unnecessarily emitted
the default column-specific ON ERROR / EMPTY behavior when the
top-level ON ERROR behavior in JSON_TABLE was set to ERROR. Fix that
by not overriding the column-specific default, determined based on
the column's JsonExprOp in get_json_table_columns(), with
JSON_BEHAVIOR_ERROR when that is the top-level ON ERROR behavior.

Note that this only removes redundancy; the current deparsing output
is not incorrect, just redundant.

Reviewed-by: Jian He <jian.universality@gmail.com>
Discussion: https://postgr.es/m/CACJufxEo4sUjKCYtda0_qt9tazqqKPmF1cqhW9KBOUeJFqQd2g@mail.gmail.com
Backpatch-through: 17
2024-09-06 12:01:49 +09:00
..
backend SQL/JSON: Fix JSON_TABLE() column deparsing 2024-09-06 12:01:49 +09:00
bin Fix warnings from msgfmt 2024-09-02 18:03:47 +02:00
common Message style improvements 2024-08-29 14:33:18 +02:00
fe_utils Prevent mis-encoding of "trailing junk after numeric literal" errors. 2024-09-05 12:42:33 -04:00
include Update comment about ExprState.escontext 2024-09-06 12:01:49 +09:00
interfaces Prevent mis-encoding of "trailing junk after numeric literal" errors. 2024-09-05 12:42:33 -04:00
makefiles Optimize pg_popcount() with AVX-512 instructions. 2024-04-06 21:56:23 -05:00
pl Translation updates 2024-09-02 12:02:42 +02:00
port Pre-beta mechanical code beautification. 2024-05-14 16:34:50 -04:00
template Remove AIX support 2024-02-28 15:17:23 +04:00
test SQL/JSON: Fix JSON_TABLE() column deparsing 2024-09-06 12:01:49 +09:00
timezone Update time zone data files to tzdata release 2024a. 2024-02-01 15:57:53 -05:00
tools Revert support for ALTER TABLE ... MERGE/SPLIT PARTITION(S) commands 2024-08-24 19:18:24 +03:00
tutorial Update copyright for 2024 2024-01-03 20:49:05 -05:00
.gitignore
DEVELOPERS
Makefile Remove distprep 2023-11-06 15:18:04 +01:00
Makefile.global.in Update Unicode data to CLDR 45 2024-04-22 09:16:33 +02:00
Makefile.shlib Remove AIX support 2024-02-28 15:17:23 +04:00
meson.build Update copyright for 2024 2024-01-03 20:49:05 -05:00
nls-global.mk Remove distprep 2023-11-06 15:18:04 +01:00