On 22/07/2013 17:55, Christophe Pettus wrote:
> On Jul 22, 2013, at 8:20 AM, Federico Di Gregorio wrote:
>
>>> JSON is different because the representation you get is exactly
>>> the representation you may want to send to the the client
>>> (probably over HTTP) and the conversion text->json objects->text
>>> uses quite a bit of cpu/memory.
> If you want the text version, you can ask for the text version; I
> don't think it's worth breaking an existing API over. We already
> have a precedent here in hstore.
Apart from the fact that hstore in text format is pretty much unusable:
there was no other type that has multiple useful representations until
PostgreSQL introduced json.
Looking forward, I'd say that if a type has only one useful
representation, that one should be used; but if it has multiple useful
representations the *simplest* one should be the default.
federico