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

Re: driver ODBC-PostreSQL, cursor and transaction isolation level

From: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
To: olivier dorie <olivier(dot)dorie(at)ign(dot)fr>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: driver ODBC-PostreSQL, cursor and transaction isolation level
Date: 2009-04-04 07:01:08
Message-ID: 49D705B4.5090802@tpf.co.jp (view raw or flat)
Thread:
Lists: pgsql-odbc
olivier dorie wrote:
> Hello, 
>  
> 
> I have some problems to have a transaction isolation level serializable 
> with postgresql-ODBC driver for windows by using the ODBC cursor 
> (UseDeclareFetch=1). 
>  
> 
> My database is on PostgreSQL 8.3.7/ Linux.
> 
> I use the postgresql-ODBC version 8.03.04 for windows.
> 
> I make this test with the default_transaction_isolation = 'read 
> committed' and after with the default_transaction_isolation = 
> 'serializable' on the server. The results are the same. 
>  
> 
> I do the followings operations in a c++ programm:
> 
>     * I open 2 connections on my database with the ODBC drivers:
>       “connexion1” and “connexion2”
>           o /CDatabase * db1 = new CDatabase ;///
>           o /CDatabase * db2 = new CDatabase///
>           o /db1->OpenEx (chaine_connection_mydatabase,
>             CDatabase::noOdbcDialog);///
>           o /db2->OpenEx (chaine_connection_mydatabase,
>             CDatabase::noOdbcDialog)///
>     * I ask for the number of tuples of table “table1” à n tuples:
>           o /CRecordset crs (//db1)/
>           o /crs.Open (CRecordset::snapshot, "SELECT count (*) FROM
>             table1;")///
>     * I make the “connexion1” serializable :
>           o /db1->ExecuteSQL (“BEGIN TRANSACTION;”) /
>           o /db1->ExecuteSQL (“SET TRANSACTION ISOLATION LEVEL
>             SERIALIZABLE;”)/

ODBC doesn't recommend to call dbms specific commands to control
transaction. Please use BeginTrans/CommitTrans/Rollback instead.

Anyway I improved the handling of transaction under useDeclareFetch
mode a little. Please try the drivers on testing for 8.4.0100 at
  http://www.geocities.jp/inocchichichi/psqlodbc/index.html
.

regards,
Hiroshi Inoue

In response to

Responses

pgsql-odbc by date

Next:From: olivier dorieDate: 2009-04-08 12:38:40
Subject: Re: driver ODBC-PostreSQL, cursor and transaction isolation level
Previous:From: Albe LaurenzDate: 2009-04-03 06:41:25
Subject: Re: driver ODBC-PostreSQL, cursor and transaction isolation level

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