postgresql/src/backend/utils
Amit Langote ee75a03f37 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 13:25:47 +09:00
..
activity Add callback for backend initialization in pgstats 2024-09-05 16:05:21 +09:00
adt SQL/JSON: Fix JSON_TABLE() column deparsing 2024-09-06 13:25:47 +09:00
cache Fix typos and grammar in code comments and docs 2024-09-03 14:49:04 +09:00
error Don't advance origin during apply failure. 2024-08-21 09:22:32 +05:30
fmgr Unify some error messages to ease work of translators 2024-09-04 14:53:18 +09:00
hash Add user-callable CRC functions. 2024-08-12 10:35:06 -05:00
init Rename some shared memory initialization routines 2024-08-29 09:46:21 +03:00
mb Remove dead generators for cyrillic encoding conversion tables 2024-07-29 20:38:19 +03:00
misc Apply more quoting to GUC names in messages 2024-09-04 13:50:44 +09:00
mmgr Fix incorrect sentinel byte logic in GenerationRealloc() 2024-07-06 13:59:34 +12:00
resowner Remove unused typedefs 2024-05-17 07:36:12 +02:00
sort Remove TRACE_SORT macro 2024-08-14 08:07:52 +02:00
time Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
.gitignore Rearrange makefile rules for running Gen_fmgrtab.pl. 2018-05-03 17:54:18 -04:00
errcodes.txt Add new error code for "file name too long" 2024-07-22 09:28:01 +09:00
Gen_dummy_probes.pl Update copyright for 2024 2024-01-03 20:49:05 -05:00
Gen_fmgrtab.pl Update copyright for 2024 2024-01-03 20:49:05 -05:00
generate-errcodes.pl Update copyright for 2024 2024-01-03 20:49:05 -05:00
Makefile Update copyright for 2024 2024-01-03 20:49:05 -05:00
meson.build Update copyright for 2024 2024-01-03 20:49:05 -05:00
postprocess_dtrace.sed Update copyright for 2024 2024-01-03 20:49:05 -05:00
probes.d Update copyright for 2024 2024-01-03 20:49:05 -05:00