Re: json accessors - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: json accessors
Date
Msg-id 50B67E08.1050100@dunslane.net
Whole thread Raw
In response to Re: json accessors  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
On 11/28/2012 03:44 PM, Andrew Dunstan wrote:
>
>
> As for json_to_hstore, as I mentioned, the design is intended to 
> enable the easy constructyion of such transformations, although for 
> hstores anything except trivial json structure (i.e. an unnested 
> object) it might have unappealing results. But in any case, the 
> important thing to do first is to get the infrastructure in place. 
> Time is very short and I don't want to extend this very much.


The other thing about doing json_to_hstore() is that, since hstore is 
not itself a core type, we couldn't do that in the core json module, and 
therefore we'd either need to expose an API to the JSON parser or 
replicate it in the hstore module. Exposing it is probably the better 
way to go. Then people could write extensions that process json just by 
supplying the hooked functions.

cheers

andrew





pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: WIP patch for hint bit i/o mitigation
Next
From: "Kevin Grittner"
Date:
Subject: Re: foreign key locks