Re: Changing set_session implementation

From: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
To: Christophe Pettus <xof(at)thebuild(dot)com>
Cc: "psycopg(at)postgresql(dot)org" <psycopg(at)postgresql(dot)org>
Subject: Re: Changing set_session implementation
Date: 2017-02-08 13:35:21
Message-ID: CA+mi_8Y-QbDkECw_t9MxL=OEn5x_3yWPsjBzWOQ8U=Jiiu+POQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

On Wed, Feb 8, 2017 at 10:47 AM, Christophe Pettus <xof(at)thebuild(dot)com> wrote:

>> On Feb 4, 2017, at 08:33, Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)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 LEVEL across 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

In response to

Responses

Browse psycopg by date

  From Date Subject
Next Message Daniele Varrazzo 2017-02-08 13:45:03 Psycopg 2.7 beta 1 released
Previous Message Christophe Pettus 2017-02-08 10:47:40 Re: Changing set_session implementation