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

From Tom Lane
Subject Re: Abnormal JSON query performance
Date
Msg-id 21332.1526313214@sss.pgh.pa.us
Whole thread Raw
In response to Re: Abnormal JSON query performance  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Abnormal JSON query performance
List pgsql-bugs
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> 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?

https://www.postgresql.org/docs/current/static/functions-json.html#FUNCTIONS-JSON-PROCESSING-TABLE

Perhaps it'd be worth emphasizing the usefulness of jsonb_to_record[set]
a bit more, say with examples in section 8.14.

            regards, tom lane


pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: "REVOKE ... ON DATABASE template1 ..." has no effect
Next
From: Tom Lane
Date:
Subject: Re: BUG #15196: bogus data in lock file "postmaster.pid"