Re: Problem with the default registration of the JSON adapter
От | Federico Di Gregorio |
---|---|
Тема | Re: Problem with the default registration of the JSON adapter |
Дата | |
Msg-id | 51ED5871.50304@dndg.it обсуждение исходный текст |
Ответ на | Re: Problem with the default registration of the JSON adapter (Christophe Pettus <xof@thebuild.com>) |
Ответы |
Re: Problem with the default registration of the JSON adapter
|
Список | psycopg |
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
В списке psycopg по дате отправления: