pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hiroshi Inoue <inoue@tpf.co.jp>
To: olivier dorie <olivier.dorie@ign.fr>
Cc: pgsql-odbc@postgresql.org
Subject: Re: driver ODBC-PostreSQL, cursor and transaction isolation level
Date: Sat, 04 Apr 2009 16:01:08 +0900
Message-ID: <49D705B4.5090802@tpf.co.jp> (raw)
In-Reply-To: <056F3845699645D39CF3C392BD754BEA@ign.fr>
References: <056F3845699645D39CF3C392BD754BEA@ign.fr>

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



view thread (7+ messages)  latest in thread

Message-ID: <49D705B4.5090802@tpf.co.jp>
Permalink:  ../49D705B4.5090802@tpf.co.jp/
Also on:    postgresql.org/message-id/49D705B4.5090802@tpf.co.jp

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: inoue@tpf.co.jp, olivier.dorie@ign.fr
  Subject: Re: driver ODBC-PostreSQL, cursor and transaction isolation level
  In-Reply-To: <49D705B4.5090802@tpf.co.jp>
  References: <056F3845699645D39CF3C392BD754BEA@ign.fr> <49D705B4.5090802@tpf.co.jp>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox