pgsql: Remove ill-conceived ban on zero length json object keys.

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Remove ill-conceived ban on zero length json object keys.
Date: 2014-09-25 19:12:58
Message-ID: E1XXETK-00046c-Lb@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Remove ill-conceived ban on zero length json object keys.

We removed a similar ban on this in json_object recently, but the ban in
datum_to_json was left, which generate4d sprutious errors in othee json
generators, notable json_build_object.

Along the way, add an assertion that datum_to_json is not passed a null
key. All current callers comply with this rule, but the assertion will
catch any possible future misbehaviour.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/9111d46351e8c3d82452a7454e43ccbf1991b3dc

Modified Files
--------------
src/backend/utils/adt/json.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2014-09-25 23:59:20 pgsql: Add a basic atomic ops API abstracting away platform/architectur
Previous Message Robert Haas 2014-09-25 14:58:10 pgsql: Change locking regimen around buffer replacement.