Re: Transaction control overhauling
От | Daniele Varrazzo |
---|---|
Тема | Re: Transaction control overhauling |
Дата | |
Msg-id | BANLkTim-hk7gCVBB5-sF0mwK74a+++Pf+w@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Transaction control overhauling (Magnus Hagander <magnus@hagander.net>) |
Список | psycopg |
On Thu, May 12, 2011 at 12:57 PM, Magnus Hagander <magnus@hagander.net> wrote: >> II. add a method conn.set_transaction(isolation_level=None, >> read_only=None, deferrable=None) allowing to change one or more of the >> transaction settings. Calling the method would terminate the current >> transaction and put the new settings in place. Note that there are >> several ways for implementing this: > > Ugh. Big -1 on the "terminate current transaction". First of all, I > *assume* you mean ROLLBACK and not COMMIT. But even so, I think it's a > much better idea to raise a local exception when trying to change it > while inside a transaction. Yes, the idea was to issue a rollback. This is the current behaviour of set_isolation_level(). No problem in having an exception raised instead: it seems actually a better defined behaviour. -- Daniele
В списке psycopg по дате отправления: