Skip site navigation (1) Skip section navigation (2)

Re: autocommit and Django

From: Federico Di Gregorio <federico(dot)digregorio(at)dndg(dot)it>
To: psycopg(at)postgresql(dot)org
Subject: Re: autocommit and Django
Date: 2011-06-14 10:09:57
Message-ID: 4DF73375.9040304@dndg.it (view raw or flat)
Thread:
Lists: psycopg
On 14/06/11 12:02, Federico Di Gregorio wrote:
>> Thoughts?
> Yes, it is wrong. set_isolation_level() was wrong from the start but we
> had to keep it that way to avoid breaking compatibility. The discussion
> you linked still holds so I won't go back to sending a magic ROLLBACK.
> 
> If we don't want to wait for the #(at)§%£$! person that wrote the Django
> code to fix it we can just make .autocommit a real attribute and set the
> session autocommit mode when it is assigned True/False.

Ok, I am completely #(at)§%£$! like a Django developer today (in fact I am
working on a project using it...).

Rewind.

Yes, it is wrong. [Rest of paragraph above...]

I think there is no way to fix this on our side. Even if we just ad an
attribute, like Karsten suggested Django code should still  check it but
if they change the code they can just fix the problem without the need
to add an attribute.

federico

-- 
Federico Di Gregorio                         federico(dot)digregorio(at)dndg(dot)it
Studio Associato Di Nunzio e Di Gregorio                  http://dndg.it
  The devil speaks truth much oftener than he's deemed.
   He has an ignorant audience.    -- Byron (suggested by Alice Fontana)

In response to

Responses

psycopg by date

Next:From: Karsten HilbertDate: 2011-06-14 10:15:39
Subject: Re: autocommit and Django
Previous:From: Federico Di GregorioDate: 2011-06-14 10:02:26
Subject: Re: autocommit and Django

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group