Re: json api WIP patch

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Hannu Krosing <hannu(at)krosing(dot)net>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: json api WIP patch
Date: 2013-02-05 09:04:37
Message-ID: CAFj8pRBn4Bw_Z2BL38AKP0Aua+Tkf3pRE=CQuof5ghLBtwXM1w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2013/2/5 Andrew Dunstan <andrew(at)dunslane(dot)net>:
>
> On 02/05/2013 02:09 AM, Pavel Stehule wrote:
>
>
>>
>> I don't see any nice on design select
>> myjson->>'{"authors",0,"name"}'::text[]; - more it is ugly as
>> dinosaurs
>
>
> I rather like dinosaurs. Beauty is, as they say, in the eye of the beholder.
>
> Let me also point out that you can say (somewhat less efficiently):
>
> myjson->'authors'->0->>'name'
>
> which is not terribly inelegant.
>
>
>>
>> better and more usual
>>
>> myjson['authors']['0']['name']
>>
>> or
>>
>> myjson['authors/0/name']
>
>
>
> Well, nothing like that is going to happen in this release. If you or
> someone wants to work on a general subscripting facility for arbitrary data
> types then I look forward to seeing it.
>
> Let me also point out that the most important part of this patch is the part
> that almost nobody has commented on, namely the parser changes and API that
> the actual visible functions are built on. Writing JSON accessor /
> transformation functions without this framework is hard, and often
> redundant. I'm much more concerned to get this framework and some basic
> accessor functions (and preferably operators) added than bothered about how
> the latter are precisely spelled.

C API and implementation can be changed or fixed without hard issues
- it is usual so about SQL interface is hard discussion.

Regards

Pavel

>
>
> cheers
>
> andrew
>
>
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Farina 2013-02-05 09:17:48 Re: [v9.3] writable foreign tables
Previous Message Craig Ringer 2013-02-05 08:45:51 Re: src/ports/pgcheckdir.c - Ignore dot directories...