Re: Abnormal JSON query performance - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: Abnormal JSON query performance
Date
Msg-id CAKFQuwa8m-gPNsDJHTc5nfeu5uEWvsrHx3neEOpoxARu+6CkxA@mail.gmail.com
Whole thread Raw
In response to Re: Abnormal JSON query performance  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Abnormal JSON query performance  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Mon, May 14, 2018 at 7:49 AM, Tom Lane <tgl@sss.pgh.pa.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.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Abnormal JSON query performance
Next
From: PG Bug reporting form
Date:
Subject: BUG #15196: bogus data in lock file "postmaster.pid"