From: | Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com> |
---|---|
To: | Federico Di Gregorio <fog(at)dndg(dot)it> |
Cc: | "psycopg(at)postgresql(dot)org" <psycopg(at)postgresql(dot)org> |
Subject: | Re: JSONB marshalling |
Date: | 2014-08-12 21:23:36 |
Message-ID: | CA+mi_8Y915NC+RBfUd_Vj19khDePHirDTOQbwoz1UjGTyVJ3Uw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | psycopg |
On Fri, Jul 25, 2014 at 5:40 PM, Federico Di Gregorio <fog(at)dndg(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Christophe Pettus | 2014-08-12 21:32:05 | Re: JSONB marshalling |
Previous Message | Joe Abbate | 2014-08-12 19:52:54 | Re: Fastest way to insert/update many rows |