Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id C968F632F9B for ; Wed, 8 Apr 2009 09:45:13 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 27525-04 for ; Wed, 8 Apr 2009 09:45:09 -0300 (ADT) X-Greylist: delayed 00:06:24.34225 by SQLgrey-1.7.6 Received: from smtp2.ign.fr (smtp2.ign.fr [192.134.132.58]) by mail.postgresql.org (Postfix) with ESMTP id 65182632D66 for ; Wed, 8 Apr 2009 09:45:09 -0300 (ADT) Received: from newsmtp.ign.fr (newpop.ign.fr [172.21.0.149]) by smtp2.ign.fr (8.13.8/8.13.8/Debian-3) with ESMTP id n38CcbOk013129; Wed, 8 Apr 2009 14:38:38 +0200 Received: from DEL9323970 (del-9323970.ign.fr [172.16.0.113]) by newsmtp.ign.fr (Postfix) with ESMTP id F3D68D4C165; Wed, 8 Apr 2009 14:38:29 +0200 (CEST) From: "olivier dorie" To: "'Hiroshi Inoue'" Cc: References: <056F3845699645D39CF3C392BD754BEA@ign.fr> <49D705B4.5090802@tpf.co.jp> Subject: Re: driver ODBC-PostreSQL, cursor and transaction isolation level Date: Wed, 8 Apr 2009 14:38:40 +0200 Message-ID: <42CE9A44C44D480FA6D7B376CE95871F@ign.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <49D705B4.5090802@tpf.co.jp> Thread-Index: Acm081fOHEufz1oESuOles2stMjRugDUJOYQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200904/4 X-Sequence-Number: 9823 Hiroshi, Thank you for your answer. I try the 2 solutions (BeginTrans and the driver 8.4.0100) and the two = of them work: in the small test, I describe in the last mail, the = transaction is serializable. I have a last question: with BeginTrans or with the driver 8.4.0100, = the transaction isolation level is every time serializable ? Is it possible = to have a read committed level? Regards Olivier -----Message d'origine----- De=A0: pgsql-odbc-owner@postgresql.org [mailto:pgsql-odbc-owner@postgresql.org] De la part de Hiroshi Inoue Envoy=E9=A0: samedi 4 avril 2009 09:01 =C0=A0: olivier dorie Cc=A0: pgsql-odbc@postgresql.org Objet=A0: Re: [ODBC] driver ODBC-PostreSQL, cursor and transaction = isolation level olivier dorie wrote: > Hello,=20 > =20 >=20 > I have some problems to have a transaction isolation level = serializable=20 > with postgresql-ODBC driver for windows by using the ODBC cursor=20 > (UseDeclareFetch=3D1).=20 > =20 >=20 > My database is on PostgreSQL 8.3.7/ Linux. >=20 > I use the postgresql-ODBC version 8.03.04 for windows. >=20 > I make this test with the default_transaction_isolation =3D 'read=20 > committed' and after with the default_transaction_isolation =3D=20 > 'serializable' on the server. The results are the same.=20 > =20 >=20 > I do the followings operations in a c++ programm: >=20 > * I open 2 connections on my database with the ODBC drivers: > =93connexion1=94 and =93connexion2=94 > o /CDatabase * db1 =3D new CDatabase ;/// > o /CDatabase * db2 =3D 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 =93table1=94 =E0 n = tuples: > o /CRecordset crs (//db1)/ > o /crs.Open (CRecordset::snapshot, "SELECT count (*) FROM > table1;")/// > * I make the =93connexion1=94 serializable : > o /db1->ExecuteSQL (=93BEGIN TRANSACTION;=94) / > o /db1->ExecuteSQL (=93SET TRANSACTION ISOLATION LEVEL > SERIALIZABLE;=94)/ 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 --=20 Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc