Re: PATCH: Add hstore_to_json() - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: PATCH: Add hstore_to_json()
Date
Msg-id 4B3E74EC.3030406@dunslane.net
Whole thread Raw
In response to Re: PATCH: Add hstore_to_json()  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: PATCH: Add hstore_to_json()  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: PATCH: Add hstore_to_json()  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers

Peter Eisentraut wrote:
>> IMNSHO it's essential. I think Peter's approach of ignoring this 
>> requirement is extremely shortsighted.
>>     
>
> Whose requirement is it?  I'm not ignoring it, but so far no one has
> actually said that it is a requirement and why.
>
>   

Mine for one :-). Quite apart from any other reason I would expect it to 
make indexing parts of the JSON more tractable. Say we use it to store a 
web session object, which is a natural enough use. I might well want to 
find or modify sessions with certain characteristics. I'm sure I 
wouldn't be the only possible usewr who would want something 
substantially more of such a type than just being able to validate it. 
We have XPath for XML. and a substantial accessor API for hstore, so why 
would we want anything less for JSON?

In general we have adopted an approach that allows for a very rich type 
system, with a substantial set of manipulator functions for almost all 
types. That's one of the things I find attractive about Postgres, so I 
think we should stick to it in this instance.

cheers

andrew


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Cancelling idle in transaction state
Next
From: Tom Lane
Date:
Subject: Re: PATCH: Add hstore_to_json()