pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix handling of empty arrays in array_fill(). 6+ messages / 1 participants [nested] [flat]
* pgsql: Fix handling of empty arrays in array_fill(). @ 2017-01-05 16:34 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2017-01-05 16:34 UTC (permalink / raw) To: pgsql-committers Fix handling of empty arrays in array_fill(). array_fill(..., array[0]) produced an empty array, which is probably what users expect, but it was a one-dimensional zero-length array which is not our standard representation of empty arrays. Also, for no very good reason, it rejected empty input arrays; that case should be allowed and produce an empty output array. In passing, remove the restriction that the input array(s) have lower bound 1. That seems rather pointless, and it would have needed extra complexity to make the check deal with empty input arrays. Per bug #14487 from Andrew Gierth. It's been broken all along, so back-patch to all supported branches. Discussion: https://postgr.es/m/20170105152156.10135.64195@wrigleys.postgresql.org Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/82f8107b92c9104ec9d9465f3f6a4c6dab4c124a Modified Files -------------- src/backend/utils/adt/arrayfuncs.c | 26 +++++++------------------- src/test/regress/expected/arrays.out | 27 +++++++++++++++++++++++++++ src/test/regress/sql/arrays.sql | 8 ++++++++ 3 files changed, 42 insertions(+), 19 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix handling of empty arrays in array_fill(). @ 2017-01-05 16:34 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2017-01-05 16:34 UTC (permalink / raw) To: pgsql-committers Fix handling of empty arrays in array_fill(). array_fill(..., array[0]) produced an empty array, which is probably what users expect, but it was a one-dimensional zero-length array which is not our standard representation of empty arrays. Also, for no very good reason, it rejected empty input arrays; that case should be allowed and produce an empty output array. In passing, remove the restriction that the input array(s) have lower bound 1. That seems rather pointless, and it would have needed extra complexity to make the check deal with empty input arrays. Per bug #14487 from Andrew Gierth. It's been broken all along, so back-patch to all supported branches. Discussion: https://postgr.es/m/20170105152156.10135.64195@wrigleys.postgresql.org Branch ------ REL9_6_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/5b4f8f4c6d618063f7dde0a710a4076fb444620a Modified Files -------------- src/backend/utils/adt/arrayfuncs.c | 26 +++++++------------------- src/test/regress/expected/arrays.out | 27 +++++++++++++++++++++++++++ src/test/regress/sql/arrays.sql | 8 ++++++++ 3 files changed, 42 insertions(+), 19 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix handling of empty arrays in array_fill(). @ 2017-01-05 16:34 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2017-01-05 16:34 UTC (permalink / raw) To: pgsql-committers Fix handling of empty arrays in array_fill(). array_fill(..., array[0]) produced an empty array, which is probably what users expect, but it was a one-dimensional zero-length array which is not our standard representation of empty arrays. Also, for no very good reason, it rejected empty input arrays; that case should be allowed and produce an empty output array. In passing, remove the restriction that the input array(s) have lower bound 1. That seems rather pointless, and it would have needed extra complexity to make the check deal with empty input arrays. Per bug #14487 from Andrew Gierth. It's been broken all along, so back-patch to all supported branches. Discussion: https://postgr.es/m/20170105152156.10135.64195@wrigleys.postgresql.org Branch ------ REL9_5_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/4555a375a1b27a49f5f9da2474159557360d17de Modified Files -------------- src/backend/utils/adt/arrayfuncs.c | 26 +++++++------------------- src/test/regress/expected/arrays.out | 27 +++++++++++++++++++++++++++ src/test/regress/sql/arrays.sql | 8 ++++++++ 3 files changed, 42 insertions(+), 19 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix handling of empty arrays in array_fill(). @ 2017-01-05 16:34 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2017-01-05 16:34 UTC (permalink / raw) To: pgsql-committers Fix handling of empty arrays in array_fill(). array_fill(..., array[0]) produced an empty array, which is probably what users expect, but it was a one-dimensional zero-length array which is not our standard representation of empty arrays. Also, for no very good reason, it rejected empty input arrays; that case should be allowed and produce an empty output array. In passing, remove the restriction that the input array(s) have lower bound 1. That seems rather pointless, and it would have needed extra complexity to make the check deal with empty input arrays. Per bug #14487 from Andrew Gierth. It's been broken all along, so back-patch to all supported branches. Discussion: https://postgr.es/m/20170105152156.10135.64195@wrigleys.postgresql.org Branch ------ REL9_4_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/4e446563be720760efcb18e4a83b7189638f6ae8 Modified Files -------------- src/backend/utils/adt/arrayfuncs.c | 26 +++++++------------------- src/test/regress/expected/arrays.out | 27 +++++++++++++++++++++++++++ src/test/regress/sql/arrays.sql | 8 ++++++++ 3 files changed, 42 insertions(+), 19 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix handling of empty arrays in array_fill(). @ 2017-01-05 16:34 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2017-01-05 16:34 UTC (permalink / raw) To: pgsql-committers Fix handling of empty arrays in array_fill(). array_fill(..., array[0]) produced an empty array, which is probably what users expect, but it was a one-dimensional zero-length array which is not our standard representation of empty arrays. Also, for no very good reason, it rejected empty input arrays; that case should be allowed and produce an empty output array. In passing, remove the restriction that the input array(s) have lower bound 1. That seems rather pointless, and it would have needed extra complexity to make the check deal with empty input arrays. Per bug #14487 from Andrew Gierth. It's been broken all along, so back-patch to all supported branches. Discussion: https://postgr.es/m/20170105152156.10135.64195@wrigleys.postgresql.org Branch ------ REL9_3_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/ee9cb284a6d6c79080033b825391b8b78b5eccfb Modified Files -------------- src/backend/utils/adt/arrayfuncs.c | 26 +++++++------------------- src/test/regress/expected/arrays.out | 27 +++++++++++++++++++++++++++ src/test/regress/sql/arrays.sql | 8 ++++++++ 3 files changed, 42 insertions(+), 19 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix handling of empty arrays in array_fill(). @ 2017-01-05 16:34 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2017-01-05 16:34 UTC (permalink / raw) To: pgsql-committers Fix handling of empty arrays in array_fill(). array_fill(..., array[0]) produced an empty array, which is probably what users expect, but it was a one-dimensional zero-length array which is not our standard representation of empty arrays. Also, for no very good reason, it rejected empty input arrays; that case should be allowed and produce an empty output array. In passing, remove the restriction that the input array(s) have lower bound 1. That seems rather pointless, and it would have needed extra complexity to make the check deal with empty input arrays. Per bug #14487 from Andrew Gierth. It's been broken all along, so back-patch to all supported branches. Discussion: https://postgr.es/m/20170105152156.10135.64195@wrigleys.postgresql.org Branch ------ REL9_2_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/e0d59c6ef57bad6f9a4f1de0c5635be2eb7fea5a Modified Files -------------- src/backend/utils/adt/arrayfuncs.c | 26 +++++++------------------- src/test/regress/expected/arrays.out | 27 +++++++++++++++++++++++++++ src/test/regress/sql/arrays.sql | 8 ++++++++ 3 files changed, 42 insertions(+), 19 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2017-01-05 16:34 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2017-01-05 16:34 pgsql: Fix handling of empty arrays in array_fill(). Tom Lane <tgl@sss.pgh.pa.us> 2017-01-05 16:34 pgsql: Fix handling of empty arrays in array_fill(). Tom Lane <tgl@sss.pgh.pa.us> 2017-01-05 16:34 pgsql: Fix handling of empty arrays in array_fill(). Tom Lane <tgl@sss.pgh.pa.us> 2017-01-05 16:34 pgsql: Fix handling of empty arrays in array_fill(). Tom Lane <tgl@sss.pgh.pa.us> 2017-01-05 16:34 pgsql: Fix handling of empty arrays in array_fill(). Tom Lane <tgl@sss.pgh.pa.us> 2017-01-05 16:34 pgsql: Fix handling of empty arrays in array_fill(). 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