pgsql: Clean up handling of unknown-type inputs in json_build_object an

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Clean up handling of unknown-type inputs in json_build_object an
Date: 2014-08-09 21:31:30
Message-ID: E1XGEEc-0000Lk-8Z@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Clean up handling of unknown-type inputs in json_build_object and friends.

There's actually no need for any special case for unknown-type literals,
since we only need to push the value through its output function and
unknownout() works fine. The code that was here was completely bizarre
anyway, and would fail outright in cases that should work, not to mention
suffering from some copy-and-paste bugs.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/92f57c9ae95668636bc77d3cda3edbdfd83320d9

Modified Files
--------------
src/backend/utils/adt/json.c | 166 ++++++++++++++++++------------------------
1 file changed, 72 insertions(+), 94 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2014-08-09 22:40:49 pgsql: Fix conversion of domains to JSON in 9.3 and 9.2.
Previous Message Tom Lane 2014-08-09 20:35:45 pgsql: Further cleanup of JSON-specific error messages.