Re: json api WIP patch - Mailing list pgsql-hackers

From Merlin Moncure
Subject Re: json api WIP patch
Date
Msg-id CAHyXU0yYfaq_tThXSyHpmimT6KP_FcLxTbCDszHGMji5XgtPwA@mail.gmail.com
Whole thread Raw
In response to Re: json api WIP patch  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
On Mon, Feb 4, 2013 at 2:10 PM, Andrew Dunstan <andrew@dunslane.net> wrote:
>
>> My only remaining nit with the proposal is with json_unnest().
>>
>> SQL unnest() produces list of scalars regardless of dimensionality --
>> json unnest unwraps one level only (contrast: pl/pgsql array 'slice').
>>   So I think 'json_array_each', or perhaps json_slice() is a better fit
>> there.
>>
>
>
> how about json_array_elements()?

that works (although it's a little verbose for my taste).  maybe
json_unwrap, json_array_unwrap, etc.

merlin



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: split rm_name and rm_desc out of rmgr.c
Next
From: Daniel Farina
Date:
Subject: Re: json api WIP patch