Re: driver ODBC-PostreSQL, cursor and transaction isolation level
От | olivier dorie |
---|---|
Тема | Re: driver ODBC-PostreSQL, cursor and transaction isolation level |
Дата | |
Msg-id | 42CE9A44C44D480FA6D7B376CE95871F@ign.fr обсуждение исходный текст |
Ответ на | Re: driver ODBC-PostreSQL, cursor and transaction isolation level (Hiroshi Inoue <inoue@tpf.co.jp>) |
Ответы |
Re: driver ODBC-PostreSQL, cursor and transaction isolation
level
|
Список | pgsql-odbc |
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 : pgsql-odbc-owner@postgresql.org [mailto:pgsql-odbc-owner@postgresql.org] De la part de Hiroshi Inoue Envoyé : samedi 4 avril 2009 09:01 À : olivier dorie Cc : pgsql-odbc@postgresql.org Objet : Re: [ODBC] driver ODBC-PostreSQL, cursor and transaction isolation level 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 -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc
В списке pgsql-odbc по дате отправления: