Re: autocommit and Django

Поиск
Список
Период
Сортировка
От Daniele Varrazzo
Тема Re: autocommit and Django
Дата
Msg-id BANLkTi=6tOcCy812_GKsXM8Bx_FD=UUoOA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: autocommit and Django  (Federico Di Gregorio <federico.digregorio@dndg.it>)
Список psycopg
On Tue, Jun 14, 2011 at 11:02 AM, Federico Di Gregorio
<federico.digregorio@dndg.it> wrote:

> If we don't want to wait for the #@§%£$! 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.

This wouldn't work as if the exception is raised it means that they
have already started a transaction, probably by setting time_zone to
chicago or something like that. The "create database" they mean to run
outside the transaction is then doomed to fail.

-- Daniele

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

Предыдущее
От: Karsten Hilbert
Дата:
Сообщение: Re: autocommit and Django
Следующее
От: "W. Matthew Wilson"
Дата:
Сообщение: Can I map "raise XXX" to some custom python exceptions?