Re: JSONB marshalling

Поиск
Список
Период
Сортировка
От Daniele Varrazzo
Тема Re: JSONB marshalling
Дата
Msg-id CA+mi_8Y915NC+RBfUd_Vj19khDePHirDTOQbwoz1UjGTyVJ3Uw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: JSONB marshalling  (Federico Di Gregorio <fog@dndg.it>)
Ответы Re: JSONB marshalling  (Christophe Pettus <xof@thebuild.com>)
Список psycopg
On Fri, Jul 25, 2014 at 5:40 PM, Federico Di Gregorio <fog@dndg.it> wrote:

> What Daniele was asking is if someone has something against enabling it
> as default in the next point release. Given that json type
> caster/adapter is already enabled I don't see any reason to not register
> jsonb one too.

After reading this SO question
<http://stackoverflow.com/questions/25263736/jsonb-with-psycopg2-realdictcursor>
I'm thinking that users expect jsonb to work exactly like json does.
Our docs say that json is automatically converted into python objects
since psycopg 2.5
<http://initd.org/psycopg/docs/extras.html#json-adaptation> so I think
we won't get many complaints if starting from 2.5.4 we supported jsonb
the same way. Only behavioural change would be noticed by users
running an older psycopg2 version with a still-to-be-released Postgres
version, which is an odd combination at best, unlikely to be found in
the wild. it would be a better scenario if people upgrading their
schemas from json to jsonb found their default psycopg installation
not changing behaviour with the different data type.

So, if nobody shouts in disagreement, there will be a 2.5.4 released
in a few days/couple of weeks with a handful of secondary bugfixes and
jsonb support baked in.

-- Daniele


В списке psycopg по дате отправления:

Предыдущее
От: Joe Abbate
Дата:
Сообщение: Re: Fastest way to insert/update many rows
Следующее
От: Christophe Pettus
Дата:
Сообщение: Re: JSONB marshalling