On Mon, May 14, 2018 at 7:49 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> SELECT ... FROM ...some tables...,
> jsonb_to_record(jsonbcol) AS j(id int, name text, price numeric)
> WHERE ...
>
> which is something you can do today.
>
Indeed you can - could you please point to the docs for that one?
SELECT *
FROM (VALUES ('{"id":1,"name":"Dave","country":"US"}'::json)) vals (v)
, json_to_record(v) j(name text, country text)
David J.