Re: json api WIP patch

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Benedikt Grundmann <bgrundmann(at)janestreet(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Daniel Farina <daniel(at)heroku(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: json api WIP patch
Date: 2013-02-04 21:16:01
Message-ID: CAHyXU0yYfaq_tThXSyHpmimT6KP_FcLxTbCDszHGMji5XgtPwA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Feb 4, 2013 at 2:10 PM, Andrew Dunstan <andrew(at)dunslane(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Farina 2013-02-04 21:19:32 Re: json api WIP patch
Previous Message Simon Riggs 2013-02-04 21:06:50 Re: split rm_name and rm_desc out of rmgr.c