Re: passing multiple records to json_populate_recordset - Mailing list pgsql-general

From Adrian Klaver
Subject Re: passing multiple records to json_populate_recordset
Date
Msg-id 52404AE8.7020709@gmail.com
Whole thread Raw
In response to Re: passing multiple records to json_populate_recordset  (Raphael Bauduin <rblists@gmail.com>)
List pgsql-general
On 09/23/2013 06:25 AM, Raphael Bauduin wrote:
>
>
> Some more info, after searching further.
>
> This query
>
>    select
> json_populate_record(null::product,row_to_json(json_populate_recordset(null::product,event->'products')))
> from (select * from events limit 2) as foo ;
>
> returns what I want but not in the format I want (why?):

Maybe try:

select  * from
json_populate_record(null::product,row_to_json(json_populate_recordset(null::product,event->'products')))
from (select * from events limit 2) as foo ;

>
> Raph


--
Adrian Klaver
adrian.klaver@gmail.com


pgsql-general by date:

Previous
From: Jayadevan M
Date:
Subject: Re: Query runs forever after upgrading to 9.3
Next
From: Chris Travers
Date:
Subject: Re: Tree structure