Re: WIP: transformation hook modules and JSON support

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP: transformation hook modules and JSON support
Date: 2009-04-01 13:06:47
Message-ID: 162867790904010606m66b82482vf46fb7fbb803101b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2009/4/1 Alvaro Herrera <alvherre(at)commandprompt(dot)com>:
> Pavel Stehule escribió:
>> Hello
>>
>> I am sending samples of transformation hook modules. One module is
>> JSON support:.
>>
>> From these modules only JSON support has general usage - so only JSON
>> should be integrated to core.
>
> I'm only seeing trivial examples below, where you form the JSON objects
> by plastering literals together.  Does this work on a scenario where the
> values come from a table?

what do you thing?

My implementation works similar like SQL/XML functions - so of course,
you can read data from tables. But actually, these functions are not
100% optimised.

>
> The question is not at all theoretical -- right now our
> archives.postgresql.org site uses a JSON file that's just a dump of a
> table in a database.  This file contains a list of lists, and a number
> of properties for each (name, group it belongs to, description).
> Obviously each one needs its label too.

nested JSON structures are possible.

Pavel Stehule

>
> Right now we generate this with a JSON Perl module.
>
> --
> Alvaro Herrera                                http://www.CommandPrompt.com/
> The PostgreSQL Company - Command Prompt, Inc.
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Sam Mason 2009-04-01 14:00:06 Re: string_to_array with empty input
Previous Message Heikki Linnakangas 2009-04-01 11:31:33 Re: More message encoding woes