pgsql: Make edge-case behavior of jsonb_populate_record match json_popu

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Make edge-case behavior of jsonb_populate_record match json_popu
Date: 2017-05-29 23:29:52
Message-ID: E1dFU6i-0002b4-8G@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Make edge-case behavior of jsonb_populate_record match json_populate_record

json_populate_record throws an error if asked to convert a JSON scalar
or array into a composite type. jsonb_populate_record was returning
a record full of NULL fields instead. It seems better to make it
throw an error for this case as well.

Nikita Glukhov

Discussion: https://postgr.es/m/fbd1d566-bba0-a3de-d6d0-d3b1d7c24ff2@postgrespro.ru

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/68cff231e3a3d0ca9988cf1fde5a3be53235b3bb

Modified Files
--------------
src/backend/utils/adt/jsonfuncs.c | 17 ++++++++++++++++-
src/test/regress/expected/jsonb.out | 18 +++---------------
2 files changed, 19 insertions(+), 16 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2017-05-30 00:28:07 pgsql: Try to ensure that stats collector's receive buffer size is at l
Previous Message Tom Lane 2017-05-29 21:08:52 pgsql: Prevent running pg_resetwal/pg_resetxlog against wrong-version d