postgresql/src/backend/utils
Amit Langote e6c45d85dc SQL/JSON: Fix JSON_QUERY(... WITH CONDITIONAL WRAPPER)
Currently, when WITH CONDITIONAL WRAPPER is specified, array wrappers
are applied even to a single SQL/JSON item if it is a scalar JSON
value, but this behavior does not comply with the standard.

To fix, apply wrappers only when there are multiple SQL/JSON items
in the result.

Reported-by: Peter Eisentraut <peter@eisentraut.org>
Author: Peter Eisentraut <peter@eisentraut.org>
Author: Amit Langote <amitlangote09@gmail.com>
Reviewed-by: Andrew Dunstan <andrew@dunslane.net>
Discussion: https://postgr.es/m/8022e067-818b-45d3-8fab-6e0d94d03626%40eisentraut.org
Backpatch-through: 17
2024-09-12 09:39:56 +09:00
..
activity Add callbacks to control flush of fixed-numbered stats 2024-09-09 11:12:29 +09:00
adt SQL/JSON: Fix JSON_QUERY(... WITH CONDITIONAL WRAPPER) 2024-09-12 09:39:56 +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