Re: passing multiple records to json_populate_recordset

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: Raphael Bauduin <rblists(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: passing multiple records to json_populate_recordset
Date: 2013-09-23 14:06:32
Message-ID: 52404AE8.7020709@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)klaver(at)gmail(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Chris Travers 2013-09-23 14:25:11 Re: Tree structure
Previous Message Jayadevan M 2013-09-23 13:58:40 Re: Query runs forever after upgrading to 9.3