Re: [GENERAL] passing multiple records to json_populate_recordset

2013-09-23 Thread Merlin Moncure
On Mon, Sep 23, 2013 at 8:33 AM, Merlin Moncure wrote: > On Mon, Sep 23, 2013 at 8:25 AM, Raphael Bauduin wrote: >> >> >> On Mon, Sep 23, 2013 at 11:31 AM, Raphael Bauduin wrote: >>> >>> Hi, >>> >>> I'm experimenting with the json data type and functions in 9.3. >>> I'm storing json objects of t

Re: [GENERAL] passing multiple records to json_populate_recordset

2013-09-23 Thread Adrian Klaver
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 t

Re: [GENERAL] passing multiple records to json_populate_recordset

2013-09-23 Thread Merlin Moncure
On Mon, Sep 23, 2013 at 8:25 AM, Raphael Bauduin wrote: > > > On Mon, Sep 23, 2013 at 11:31 AM, Raphael Bauduin wrote: >> >> Hi, >> >> I'm experimenting with the json data type and functions in 9.3. >> I'm storing json objects of this form in the event column: >> {type: 'event_type, products : [

Re: [GENERAL] passing multiple records to json_populate_recordset

2013-09-23 Thread Raphael Bauduin
On Mon, Sep 23, 2013 at 11:31 AM, Raphael Bauduin wrote: > Hi, > > I'm experimenting with the json data type and functions in 9.3. > I'm storing json objects of this form in the event column: > {type: 'event_type, products : [ {id:45, 'type': 3, 'gender':'F',..}, ..., > {} ] } > > I can issue

[GENERAL] passing multiple records to json_populate_recordset

2013-09-23 Thread Raphael Bauduin
Hi, I'm experimenting with the json data type and functions in 9.3. I'm storing json objects of this form in the event column: {type: 'event_type, products : [ {id:45, 'type': 3, 'gender':'F',..}, ..., {} ] } I can issue this query, but notice the limit 1: select * from json_populate_records