From: Andrew Dunstan <andrew@dunslane.net>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix treatment of nulls in jsonb_agg and jsonb_object_agg
Date: Fri, 24 Jul 2015 13:47:56 +0000
Message-ID: <E1ZIdKO-0000Nu-9Z@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: andrew@dunslane.net
Subject: Re: pgsql: Fix treatment of nulls in jsonb_agg and jsonb_object_agg
In-Reply-To: <E1ZIdKO-0000Nu-9Z@gemulon.postgresql.org>
References: <E1ZIdKO-0000Nu-9Z@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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