pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix treatment of nulls in jsonb_agg and jsonb_object_agg 2+ messages / 1 participants [nested] [flat]
* pgsql: Fix treatment of nulls in jsonb_agg and jsonb_object_agg @ 2015-07-24 13:47 Andrew Dunstan <andrew@dunslane.net> 0 siblings, 0 replies; 2+ messages in thread From: Andrew Dunstan @ 2015-07-24 13:47 UTC (permalink / raw) To: pgsql-committers Fix treatment of nulls in jsonb_agg and jsonb_object_agg The wrong is_null flag was being passed to datum_to_json. Also, null object key values are not permitted, and this was not being checked for. Add regression tests covering these cases, and also add those tests to the json set, even though it was doing the right thing. Fixes bug #13514, initially diagnosed by Tom Lane. Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/d9a356ff2e6bb7ed5fb1145af49fa3e51e68a98a Modified Files -------------- src/backend/utils/adt/jsonb.c | 12 +++++++++--- src/test/regress/expected/json.out | 21 ++++++++++++++++++++- src/test/regress/expected/json_1.out | 21 ++++++++++++++++++++- src/test/regress/expected/jsonb.out | 19 ++++++++++++++++++- src/test/regress/expected/jsonb_1.out | 19 ++++++++++++++++++- src/test/regress/sql/json.sql | 13 +++++++++++-- src/test/regress/sql/jsonb.sql | 12 +++++++++++- 7 files changed, 107 insertions(+), 10 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] 2+ messages in thread
* pgsql: Fix treatment of nulls in jsonb_agg and jsonb_object_agg @ 2015-07-24 13:47 Andrew Dunstan <andrew@dunslane.net> 0 siblings, 0 replies; 2+ messages in thread From: Andrew Dunstan @ 2015-07-24 13:47 UTC (permalink / raw) To: pgsql-committers Fix treatment of nulls in jsonb_agg and jsonb_object_agg The wrong is_null flag was being passed to datum_to_json. Also, null object key values are not permitted, and this was not being checked for. Add regression tests covering these cases, and also add those tests to the json set, even though it was doing the right thing. Fixes bug #13514, initially diagnosed by Tom Lane. Branch ------ REL9_5_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/016f28ad3dbf3bec14319cf2a49925b0063251aa Modified Files -------------- src/backend/utils/adt/jsonb.c | 12 +++++++++--- src/test/regress/expected/json.out | 21 ++++++++++++++++++++- src/test/regress/expected/json_1.out | 21 ++++++++++++++++++++- src/test/regress/expected/jsonb.out | 19 ++++++++++++++++++- src/test/regress/expected/jsonb_1.out | 19 ++++++++++++++++++- src/test/regress/sql/json.sql | 13 +++++++++++-- src/test/regress/sql/jsonb.sql | 12 +++++++++++- 7 files changed, 107 insertions(+), 10 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] 2+ messages in thread
end of thread, other threads:[~2015-07-24 13:47 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2015-07-24 13:47 pgsql: Fix treatment of nulls in jsonb_agg and jsonb_object_agg Andrew Dunstan <andrew@dunslane.net> 2015-07-24 13:47 pgsql: Fix treatment of nulls in jsonb_agg and jsonb_object_agg Andrew Dunstan <andrew@dunslane.net>
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