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

Re: Transaction control overhauling

From: Oswaldo <listas(at)soft-com(dot)es>
To: psycopg(at)postgresql(dot)org
Subject: Re: Transaction control overhauling
Date: 2011-05-12 16:12:16
Message-ID: 4DCC06E0.10607@soft-com.es (view raw or flat)
Thread:
Lists: psycopg
El 12/05/2011 17:47, Federico Di Gregorio escribió:
> On 12/05/11 17:15, Oswaldo wrote:
> [snip]
>> Another way is setting transacion mode with predefined constants and
>> combining it with '|':
>>
>> previous_mode = conn.set_transaction(psycppg2.TM_SERIALIZABLE |
>> psycppg2.TM_READONLY)
>
> Please don't do that C-ish thing.. Every time you do that a kitten
> somewhere dies.
>

Yes, not too pythonic but often practical to set object styles.

Sorry for the kittens ;)


-- 
Oswaldo Hernández

In response to

psycopg by date

Next:From: Israel Ben Guilherme FonsecaDate: 2011-05-13 04:48:56
Subject: Re: Input and Output data traffic
Previous:From: Federico Di GregorioDate: 2011-05-12 15:47:41
Subject: Re: Transaction control overhauling

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