Re: [psycopg] Changing set_session implementation - Mailing list psycopg

From Daniele Varrazzo
Subject Re: [psycopg] Changing set_session implementation
Date
Msg-id CA+mi_8Y-QbDkECw_t9MxL=OEn5x_3yWPsjBzWOQ8U=Jiiu+POQ@mail.gmail.com
Whole thread Raw
In response to Re: [psycopg] Changing set_session implementation  (Christophe Pettus <xof@thebuild.com>)
Responses Re: [psycopg] Changing set_session implementation  (Christophe Pettus <xof@thebuild.com>)
List psycopg
On Wed, Feb 8, 2017 at 10:47 AM, Christophe Pettus <xof@thebuild.com> wrote:

>> On Feb 4, 2017, at 08:33, Daniele Varrazzo <daniele.varrazzo@gmail.com> wrote:
>> - conn.isolation_level doesn't read the value from the server anymore
>> but will return a value stored in the Python connection object by the
>> user. The default value is the new ISOLATION_LEVEL_DEFAULT, meaning
>> "begin a transaction, but use whatever isolation level the server is
>> configured for".
>
> Just to clarify, is this also now the default for starting a new transaction (i.e., it won't send a SET ISOLATION
LEVELacross by default)? 

Correct: by default psycopg would just run BEGIN to start a new
transaction, leaving the choice of the isolation level to the database
config file, the connection setting etc. If an isolation level
different from DEFAULT is selected (or other session characteristics,
such as READ ONLY) then it will use "BEGIN ISOLATION  LEVEL ..." to
start further transactions.

-- Daniele


psycopg by date:

Previous
From: Christophe Pettus
Date:
Subject: Re: [psycopg] Changing set_session implementation
Next
From: Daniele Varrazzo
Date:
Subject: [psycopg] Psycopg 2.7 beta 1 released