git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 77761ee) | patch
SQL/JSON: Fix JSON_QUERY(... WITH CONDITIONAL WRAPPER)
2024年9月12日 00:36:31 +0000 (09:36 +0900)
2024年9月12日 00:39:56 +0000 (09:39 +0900)
commit e6c45d85dc168fb05b5ee5596a4de5167c9fe01f
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
src/backend/utils/adt/jsonpath_exec.c diff | blob | blame | history
src/test/regress/expected/sqljson_queryfuncs.out diff | blob | blame | history
src/test/regress/sql/sqljson_queryfuncs.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /