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

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 86b7cca) | patch
Remove "invalid concatenation of jsonb objects" error case.
2020年12月21日 18:11:29 +0000 (13:11 -0500)
2020年12月21日 18:11:50 +0000 (13:11 -0500)
commit ff5d5611c01f60525c30b2c3ebc16d05edb7956d
Remove "invalid concatenation of jsonb objects" error case.

The jsonb || jsonb operator arbitrarily rejected certain combinations
of scalar and non-scalar inputs, while being willing to concatenate
other combinations. This was of course quite undocumented. Rather
than trying to document it, let's just remove the restriction,
creating a uniform rule that unless we are handling an object-to-object
concatenation, non-array inputs are converted to one-element arrays,
resulting in an array-to-array concatenation. (This does not change
the behavior for any case that didn't throw an error before.)

Per complaint from Joel Jacobson. Back-patch to all supported branches.

Discussion: https://postgr.es/m/163099.1608312033@sss.pgh.pa.us
doc/src/sgml/func.sgml diff | blob | blame | history
src/backend/utils/adt/jsonfuncs.c diff | blob | blame | history
src/test/regress/expected/jsonb.out diff | blob | blame | history
src/test/regress/sql/jsonb.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

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