pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Remove "invalid concatenation of jsonb objects" error case. 7+ messages / 1 participants [nested] [flat]
* pgsql: Remove "invalid concatenation of jsonb objects" error case. @ 2020-12-21 18:12 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2020-12-21 18:12 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/ff5d5611c01f60525c30b2c3ebc16d05edb7956d Modified Files -------------- doc/src/sgml/func.sgml | 22 +++++++++++- src/backend/utils/adt/jsonfuncs.c | 71 ++++++++++++++++++------------------- src/test/regress/expected/jsonb.out | 36 +++++++++++++++++-- src/test/regress/sql/jsonb.sql | 5 +++ 4 files changed, 94 insertions(+), 40 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Remove "invalid concatenation of jsonb objects" error case. @ 2020-12-21 18:12 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2020-12-21 18:12 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/38d30a14b05e0cc2996fd311d94d7ae4fe2122aa Modified Files -------------- doc/src/sgml/func.sgml | 22 +++++++++- src/backend/utils/adt/jsonfuncs.c | 83 +++++++++++++++++-------------------- src/test/regress/expected/jsonb.out | 36 +++++++++++++++- src/test/regress/sql/jsonb.sql | 5 +++ 4 files changed, 99 insertions(+), 47 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Remove "invalid concatenation of jsonb objects" error case. @ 2020-12-21 18:12 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2020-12-21 18:12 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/38bef9e433eff68ffbfcf0a52ba7c2dc83c7466d Modified Files -------------- doc/src/sgml/func.sgml | 11 +++-- src/backend/utils/adt/jsonfuncs.c | 83 +++++++++++++++++-------------------- src/test/regress/expected/jsonb.out | 36 +++++++++++++++- src/test/regress/sql/jsonb.sql | 5 +++ 4 files changed, 85 insertions(+), 50 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Remove "invalid concatenation of jsonb objects" error case. @ 2020-12-21 18:12 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2020-12-21 18:12 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/75c8ef5ae56c5d9fad594b65eaa3bb8024f7f24f Modified Files -------------- doc/src/sgml/func.sgml | 11 +++-- src/backend/utils/adt/jsonfuncs.c | 83 +++++++++++++++++-------------------- src/test/regress/expected/jsonb.out | 36 +++++++++++++++- src/test/regress/sql/jsonb.sql | 5 +++ 4 files changed, 85 insertions(+), 50 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Remove "invalid concatenation of jsonb objects" error case. @ 2020-12-21 18:12 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2020-12-21 18:12 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/542248f9ddfd49f268b2edc4b6beeff7cf0b6aba Modified Files -------------- doc/src/sgml/func.sgml | 11 +++-- src/backend/utils/adt/jsonfuncs.c | 85 +++++++++++++++++-------------------- src/test/regress/expected/jsonb.out | 36 +++++++++++++++- src/test/regress/sql/jsonb.sql | 5 +++ 4 files changed, 86 insertions(+), 51 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Remove "invalid concatenation of jsonb objects" error case. @ 2020-12-21 18:12 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2020-12-21 18:12 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/1d5f3f976b26271b51a619f02436ec5c263db9f3 Modified Files -------------- doc/src/sgml/func.sgml | 11 +++-- src/backend/utils/adt/jsonfuncs.c | 85 +++++++++++++++++-------------------- src/test/regress/expected/jsonb.out | 36 +++++++++++++++- src/test/regress/sql/jsonb.sql | 5 +++ 4 files changed, 86 insertions(+), 51 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Remove "invalid concatenation of jsonb objects" error case. @ 2020-12-21 18:12 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2020-12-21 18:12 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL9_5_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/edcdbc44eed2eae5c7b40a051998e32ecf4f8f12 Modified Files -------------- doc/src/sgml/func.sgml | 11 +++-- src/backend/utils/adt/jsonfuncs.c | 85 +++++++++++++++++-------------------- src/test/regress/expected/jsonb.out | 36 +++++++++++++++- src/test/regress/sql/jsonb.sql | 5 +++ 4 files changed, 86 insertions(+), 51 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2020-12-21 18:12 UTC | newest] Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2020-12-21 18:12 pgsql: Remove "invalid concatenation of jsonb objects" error case. Tom Lane <tgl@sss.pgh.pa.us> 2020-12-21 18:12 pgsql: Remove "invalid concatenation of jsonb objects" error case. Tom Lane <tgl@sss.pgh.pa.us> 2020-12-21 18:12 pgsql: Remove "invalid concatenation of jsonb objects" error case. Tom Lane <tgl@sss.pgh.pa.us> 2020-12-21 18:12 pgsql: Remove "invalid concatenation of jsonb objects" error case. Tom Lane <tgl@sss.pgh.pa.us> 2020-12-21 18:12 pgsql: Remove "invalid concatenation of jsonb objects" error case. Tom Lane <tgl@sss.pgh.pa.us> 2020-12-21 18:12 pgsql: Remove "invalid concatenation of jsonb objects" error case. Tom Lane <tgl@sss.pgh.pa.us> 2020-12-21 18:12 pgsql: Remove "invalid concatenation of jsonb objects" error case. Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox