driver ODBC-PostreSQL, cursor and transaction isolation level

driver ODBC-PostreSQL, cursor and transaction isolation level

am 02.04.2009 17:53:51 von olivier dorie

This is a multi-part message in MIME format.

------=_NextPart_000_010A_01C9B3BB.FB293D90
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

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"

* CDatabase * db1 = new CDatabase ;
* CDatabase * db2 = new CDatabase
* db1->OpenEx (chaine_connection_mydatabase, CDatabase::noOdbcDialog);
* db2->OpenEx (chaine_connection_mydatabase, CDatabase::noOdbcDialog)

* I ask for the number of tuples of table "table1" --> n tuples:

* CRecordset crs (db1)
* crs.Open (CRecordset::snapshot, "SELECT count (*) FROM table1;")

* I make the "connexion1" serializable :

* db1->ExecuteSQL ("BEGIN TRANSACTION;")
* db1->ExecuteSQL ("SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;")

* In the connexion1, I add a tuple in the table "table1" :

* db1->ExecuteSQL ("INSERT INTO table1 ..;")

* In the connexion1, I ask for the number of tuples of table "table1"
--> n+1 tuples

* CRecordset crs (db1)
* crs.Open (CRecordset::snapshot, "SELECT count (*) FROM table1;")

* In the connexion2, I ask for the number of tuples of table "table1"
--> n+1 tuples;

* CRecordset crs (db1)
* crs.Open (CRecordset::snapshot, "SELECT count (*) FROM table2;")

I don't understand why the number is not n tuples in the "connexion2"
because the connexion1 is serializable ?



Do I use the good parameters for ODBC? Are there some restrictions for the
use of the cursors with ODBC-PostgreSQL and the transaction isolation level
?

My parameters are the followings:

"DRIVER={PostgreSQL
ANSI};DATABASE=;SERVER=;PORT=5438;UID=;PWD= d>;SSLmode=disable;ReadOnly=0;Protocol=7.4-1;FakeOidIndex=0; ShowOidColumn=0;
RowVersioning=0;ShowSystemTables=0;ConnSettings=;Fetch=10000 ;Socket=4096;Unk
nownSizes=0;MaxVarcharSize=255;MaxLongVarcharSize=5400000;De bug=0;CommLog=0;
Optimizer=1;Ksqo=1;UseDeclareFetch=1;TextAsLongVarchar=1;Unk nownsAsLongVarch
ar=1;BoolsAsChar=1;Parse=0;CancelAsFreeStmt=0;ExtraSysTableP refixes=dd_;;LFC
onversion=0;UpdatableCursors=1;DisallowPremature=0;TrueIsMin us1=0;BI=0;Bytea
AsLongVarBinary=0;UseServerSidePrepare=1;LowerCaseIdentifier =0;XaOpt=1"



If I use the option "UseDeclareFetch=0", the transaction isolation level
serializable is respected.



Thank's all



Olivier








------=_NextPart_000_010A_01C9B3BB.FB293D90
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns=3D"http://www.w3.org/TR/REC-html40">


charset=3Dus-ascii">









style=3D'font-size:10.0pt;
font-family:Tahoma'>Hello,



style=3D'font-size:10.0pt;
font-family:Tahoma'> 



style=3D'font-size:
10.0pt;font-family:Tahoma'>I have some problems to have a transaction =
isolation
level serializable with postgresql-ODBC driver for windows by using the =
ODBC
cursor (UseDeclareFetch=3D1).



style=3D'font-size:
10.0pt;font-family:Tahoma'> 



style=3D'font-size:
10.0pt;font-family:Tahoma'>My database is on PostgreSQL 8.3.7/ =
Linux.



style=3D'font-size:
10.0pt;font-family:Tahoma'>I use the
face=3DTahoma> lang=3DEN-GB =
style=3D'font-size:10.0pt;font-family:Tahoma'>postgresql-ODB C version =
8.03.04
for windows.



style=3D'font-size:
10.0pt;font-family:Tahoma'>I make this test with the =
default_transaction_isolation
=3D 'read committed' and after with the default_transaction_isolation =
=3D 'serializable'
on the server. The results are the same.



style=3D'font-size:
10.0pt;font-family:Tahoma'> 



style=3D'font-size:
10.0pt;font-family:Tahoma'>I do the followings operations in a c++ =
programm:




  • face=3DTahoma> lang=3DEN-GB style=3D'font-size:10.0pt;font-family:Tahoma'>I open 2
    connections on my database with the ODBC drivers: =
    “connexion1”
    and “connexion2”


    • size=3D2
      face=3D"Times New Roman"> style=3D'font-size:10.0pt;font-style:italic'>CDatabase
      * db1 =3D style=3D'color:blue'>new
      CDatabase ;
      =
      style=3D'font-size:10.0pt;font-style:italic'>
      >

    • size=3D2
      face=3D"Times New Roman"> style=3D'font-size:10.0pt;font-style:italic'>CDatabase
      * db2 =3D style=3D'color:blue'>new =
      CDatabase
      size=3D2> style=3D'font-size:10.0pt;font-style:italic'> >

    • size=3D2
      face=3D"Times New Roman"> style=3D'font-size:10.0pt;
      font-style:italic'>db1->OpenEx (chaine_connection_mydatabase,
      CDatabase::noOdbcDialog);
      lang=3DEN-GB =
      style=3D'font-size:10.0pt;font-style:italic'>
      >

    • size=3D2
      face=3D"Times New Roman"> style=3D'font-size:10.0pt;font-style:italic'>db2->OpenEx
      (chaine_connection_mydatabase, =
      CDatabase::noOdbcDialog)
      size=3D2> style=3D'font-size:10.0pt;font-style:italic'> >


  • face=3DTahoma> lang=3DEN-GB style=3D'font-size:10.0pt;font-family:Tahoma'>I ask =
    for the
    number of tuples of table “table1”
    size=3D2
    face=3DWingdings> style=3D'font-size:10.0pt;font-family:Wingdings'>à
    ont
    size=3D2 face=3DTahoma> style=3D'font-size:10.0pt;font-family:
    Tahoma'> n tuples:


    • size=3D2
      face=3DTahoma> style=3D'font-size:10.0pt;font-family:Tahoma;
      font-style:italic'>CRecordset crs (
      size=3D2
      face=3DTahoma> style=3D'font-size:10.0pt;font-family:Tahoma;
      font-style:italic'>db1)

    • size=3D2
      face=3DTahoma> style=3D'font-size:10.0pt;font-family:Tahoma;
      font-style:italic'>crs.Open (CRecordset::snapshot, "SELECT =
      count (*)
      FROM table1;")
      face=3DTahoma> lang=3DEN-GB =
      style=3D'font-size:10.0pt;font-family:Tahoma;font-style:ital ic'> p>


  • face=3DTahoma> lang=3DEN-GB style=3D'font-size:10.0pt;font-family:Tahoma'>I make =
    the “connexion1”
    serializable :


    • size=3D2
      face=3DTahoma> style=3D'font-size:10.0pt;font-family:Tahoma;
      font-style:italic'>db1->ExecuteSQL (“BEGIN =
      TRANSACTION;”)

    • size=3D2
      face=3DTahoma> style=3D'font-size:10.0pt;font-family:Tahoma;
      font-style:italic'>db1->ExecuteSQL (“SET TRANSACTION =
      ISOLATION
      LEVEL SERIALIZABLE;”)


  • face=3DTahoma> lang=3DEN-GB style=3D'font-size:10.0pt;font-family:Tahoma'>In the =
    connexion1, I
    add a tuple in the table “table1” =
    :


    • face=3DTahoma> lang=3DEN-GB =
      style=3D'font-size:10.0pt;font-family:Tahoma'>db1->ExecuteSQL
      ("INSERT INTO table1 ….;”)
      size=3D2
      face=3DTahoma> style=3D'font-size:10.0pt;font-family:Tahoma'>
      li>

  • face=3DTahoma> lang=3DEN-GB style=3D'font-size:10.0pt;font-family:Tahoma'>In the =
    connexion1, I
    ask for the number of tuples of table “table1” =
    size=3D2 face=3DWingdings> style=3D'font-size:10.0pt;font-family:
    Wingdings'>à
    lang=3DEN-GB style=3D'font-size:10.0pt;font-family:Tahoma'> n+1 =
    tuples


    • size=3D2
      face=3DTahoma> style=3D'font-size:10.0pt;font-family:Tahoma;
      font-style:italic'>CRecordset crs (
      size=3D2
      face=3DTahoma> style=3D'font-size:10.0pt;font-family:Tahoma;
      font-style:italic'>db1)

    • size=3D2
      face=3DTahoma> style=3D'font-size:10.0pt;font-family:Tahoma;
      font-style:italic'>crs.Open (CRecordset::snapshot, "SELECT =
      count (*)
      FROM table1;")
      face=3DTahoma> lang=3DEN-GB =
      style=3D'font-size:10.0pt;font-family:Tahoma;font-style:ital ic'> p>


  • face=3DTahoma> lang=3DEN-GB style=3D'font-size:10.0pt;font-family:Tahoma'>In the =
    connexion2, I
    ask for the number of tuples of table “table1” =
    size=3D2 face=3DWingdings> style=3D'font-size:10.0pt;font-family:
    Wingdings'>à
    lang=3DEN-GB style=3D'font-size:10.0pt;font-family:Tahoma'> n+1 =
    tuples;


    • size=3D2
      face=3DTahoma> style=3D'font-size:10.0pt;font-family:Tahoma;
      font-style:italic'>CRecordset crs (
      size=3D2
      face=3DTahoma> style=3D'font-size:10.0pt;font-family:Tahoma;
      font-style:italic'>db1)

    • size=3D2
      face=3DTahoma> style=3D'font-size:10.0pt;font-family:Tahoma;
      font-style:italic'>crs.Open (CRecordset::snapshot, "SELECT =
      count (*)
      FROM table2;")
      face=3DTahoma> lang=3DEN-GB =
      style=3D'font-size:10.0pt;font-family:Tahoma;font-style:ital ic'> p>




style=3D'font-size:
10.0pt;font-family:Tahoma'>I don’t understand why the number is =
not n
tuples in the “connexion2” because the connexion1 is =
serializable ?



style=3D'font-size:
10.0pt;font-family:Tahoma'> 



style=3D'font-size:
10.0pt;font-family:Tahoma'>Do I use the good parameters for ODBC? Are =
there
some restrictions for the use of the cursors with ODBC-PostgreSQL and =
the
transaction isolation level ?



style=3D'font-size:
10.0pt;font-family:Tahoma'>My parameters are the =
followings:



style=3D'font-size:
10.0pt;font-family:Tahoma'>“DRIVER=3D{PostgreSQL =
ANSI};DATABASE=3D<mabase>;SERVER=3D<monserver>;PORT=3D5438;UI=
D=3D<user>;PWD=3D<password>;SSLmode=3Ddisable;ReadOnly=3D0;Pr=
otocol=3D7.4-1;FakeOidIndex=3D0;ShowOidColumn=3D0;RowVersion ing=3D0;ShowS=
ystemTables=3D0;ConnSettings=3D;Fetch=3D10000;Socket=3D4096; UnknownSizes=3D=
0;MaxVarcharSize=3D255;MaxLongVarcharSize=3D5400000;Debug=3D 0;CommLog=3D0=
;Optimizer=3D1;Ksqo=3D1;UseDeclareFetch=3D1;TextAsLongVarcha r=3D1;Unknown=
sAsLongVarchar=3D1;BoolsAsChar=3D1;Parse=3D0;CancelAsFreeStm t=3D0;ExtraSy=
sTablePrefixes=3Ddd_;;LFConversion=3D0;UpdatableCursors=3D1; DisallowPrema=
ture=3D0;TrueIsMinus1=3D0;BI=3D0;ByteaAsLongVarBinary=3D0;Us eServerSidePr=
epare=3D1;LowerCaseIdentifier=3D0;XaOpt=3D1”
t>



style=3D'font-size:
10.0pt;font-family:Tahoma'> 



style=3D'font-size:
10.0pt;font-family:Tahoma'>If I use the option =
“UseDeclareFetch=3D0”,
the transaction isolation level serializable is =
respected.



style=3D'font-size:
10.0pt;font-family:Tahoma'> 



style=3D'font-size:
10.0pt;font-family:Tahoma'>Thank’s =
all



style=3D'font-size:
10.0pt;font-family:Tahoma'> 



style=3D'font-size:
10.0pt;font-family:Tahoma'>Olivier



style=3D'font-size:
10.0pt;font-family:Arial'> 



style=3D'font-size:
10.0pt;font-family:Arial'> 



style=3D'font-size:
10.0pt;font-family:Arial'> 









------=_NextPart_000_010A_01C9B3BB.FB293D90--

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

am 03.04.2009 08:41:25 von Albe Laurenz

olivier dorie wrote:
> I have some problems to have a transaction isolation level=20
> serializable with postgresql-ODBC driver for windows by using=20
> the ODBC cursor (UseDeclareFetch=3D1).
>=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 committ=
ed' and after with the=20
> default_transaction_isolation =3D 'serializable' on the server.=20
> The results are the same.
>=20
>
>=20
> I do the followings operations in a c++ programm:
>=20
> * I open 2 connections on my database with the ODBC drivers: "connexion1"=
and "connexion2"
>=20
> * CDatabase * db1 =3D new CDatabase ;
> * CDatabase * db2 =3D new CDatabase
> * db1->OpenEx (chaine_connection_mydatabase, CDatabase::noOdbcDialog);
> * db2->OpenEx (chaine_connection_mydatabase, CDatabase::noOdbcDialog)
>=20
> * I ask for the number of tuples of table "table1" --> n tuples:
>=20
> * CRecordset crs (db1)
> * crs.Open (CRecordset::snapshot, "SELECT count (*) FROM table1;")
>=20
> * I make the "connexion1" serializable :
>=20
> * db1->ExecuteSQL ("BEGIN TRANSACTION;")=20
> * db1->ExecuteSQL ("SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;")
>=20
> * In the connexion1, I add a tuple in the table "table1" :
>=20
> * db1->ExecuteSQL ("INSERT INTO table1 ....;")
>=20
> * In the connexion1, I ask for the number of tuples of table "table1" -->=
n+1 tuples
>=20
> * CRecordset crs (db1)
> * crs.Open (CRecordset::snapshot, "SELECT count (*) FROM table1;")
>=20
> * In the connexion2, I ask for the number of tuples of table "table1" -->=
n+1 tuples;=20
>=20
> * CRecordset crs (db1)
> * crs.Open (CRecordset::snapshot, "SELECT count (*) FROM table2;")

Wait a minute:
I would say that in connection 1, you ask for the number of tuples in table2
and not what you claim. Is this a typo?

> I don't understand why the number is not n tuples in the=20
> "connexion2" because the connexion1 is serializable ?=20

The isolation level of a transaction does not influence other transactions.
It only changes the world-view of the transaction itself.

It is the fact that there is a transaction in progress (irrespective of
its isolation level) that will keep others from seeing the inserted record.

But yes, you are right, a second connection should only see committed recor=
ds.

Yours,
Laurenz Albe

--=20
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc

Re: driver ODBC-PostreSQL, cursor and transaction isolationlevel

am 04.04.2009 09:01:08 von Hiroshi Inoue

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 =
> '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

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

am 08.04.2009 14:38:40 von olivier dorie

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é : samedi 4 avril 2009 09:01
À : 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
> 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
> 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 =
> 'serializable' on the server. The results are the same.=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


--=20
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc

Re: driver ODBC-PostreSQL, cursor and transaction isolationlevel

am 08.04.2009 16:27:08 von Hiroshi Inoue

Hi Olivier,

olivier dorie wrote:
> 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 ?

Why do you think so?
Your example doesn't seem to show us the difference.

> Is it possible to
> have a read committed level?

It's determined by the server setting. The default is read committed.

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

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

am 09.04.2009 12:05:53 von olivier dorie

This is a multi-part message in MIME format.

------=_NextPart_000_02AF_01C9B90B.888A3EB0
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: 7bit

Hi Hiroshi,



Sorry for my last message, I made some mistakes in my tests.



Since, I have made others tests with begintrans with (the driver 8.4.0100
and the driver 8.3.4):

* No dirty read

* Read committed

* Serializable



I use the server settings or ExecuteSQL("SET ISOLATION LEVEL ..")



All tests give good results.



Regards



Olivier



Hi Olivier,



olivier dorie wrote:

> 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 ?



Why do you think so?

Your example doesn't seem to show us the difference.



> Is it possible to

> have a read committed level?



It's determined by the server setting. The default is read committed.



regards,

Hiroshi Inoue








------=_NextPart_000_02AF_01C9B90B.888A3EB0
Content-Type: text/html;
charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:x=3D"urn:schemas-microsoft-com:office:excel" =
xmlns:st1=3D"urn:schemas-microsoft-com:office:smarttags" =
xmlns=3D"http://www.w3.org/TR/REC-html40">


charset=3Dus-ascii">

namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
name=3D"PersonName"/>









style=3D'font-size:10.0pt;font-family:Tahoma'>Hi =
Hiroshi,



style=3D'font-size:10.0pt;font-family:Tahoma'>  ont>



style=3D'font-size:10.0pt;font-family:Tahoma'>Sorry for my last message, =
I made
some mistakes in my tests.



style=3D'font-size:10.0pt;font-family:Tahoma'>  ont>



style=3D'font-size:10.0pt;font-family:Tahoma'>Since, I have made others =
tests
with begintrans with (the driver 8.4.0100 and the driver 8.3.4): =



style=3D'margin-left:36.0pt;text-indent:-18.0pt;mso-list:
l1 level1 lfo3'> lang=3DEN-GB
style=3D'font-size:10.0pt;font-family:Symbol'> style=3D'mso-list:Ignore'>· size=3D1 face=3D"Times New Roman"> Roman"'>        
lang=3DEN-GB style=3D'font-family:Tahoma'>No dirty read =



style=3D'margin-left:36.0pt;text-indent:-18.0pt;mso-list:
l1 level1 lfo3'> lang=3DEN-GB
style=3D'font-size:10.0pt;font-family:Symbol'> style=3D'mso-list:Ignore'>· size=3D1 face=3D"Times New Roman"> Roman"'>        
lang=3DEN-GB style=3D'font-family:Tahoma'>Read =
committed



style=3D'margin-left:36.0pt;text-indent:-18.0pt;mso-list:
l1 level1 lfo3'> lang=3DEN-GB
style=3D'font-size:10.0pt;font-family:Symbol'> style=3D'mso-list:Ignore'>· size=3D1 face=3D"Times New Roman"> Roman"'>        
lang=3DEN-GB =
style=3D'font-family:Tahoma'>Serializable



style=3D'font-size:10.0pt;font-family:Tahoma'>  ont>



style=3D'font-size:10.0pt;font-family:Tahoma'>I use the server settings =
or ExecuteSQL(“SET
ISOLATION LEVEL ….”)



style=3D'font-size:10.0pt;font-family:Tahoma'>  ont>



style=3D'font-size:10.0pt;font-family:Tahoma'>All tests give good =
results.



style=3D'font-size:
10.0pt;font-family:Tahoma'> 



style=3D'font-size:
10.0pt;font-family:Tahoma'>Regards



style=3D'font-size:
10.0pt;font-family:Tahoma'> 



style=3D'font-size:
10.0pt;font-family:Tahoma'>Olivier



style=3D'mso-element:para-border-div;border:none;border-bott om:double =
windowtext 2.25pt;
padding:0cm 0cm 1.0pt 0cm'>

face=3DTahoma> lang=3DEN-GB =
style=3D'font-size:10.0pt;font-family:Tahoma'>  ont>





face=3D"Courier New"> lang=3DEN-GB style=3D'font-size:10.0pt;font-family:"Courier New"'>Hi =
Olivier,



face=3D"Courier New"> lang=3DEN-GB style=3D'font-size:10.0pt;font-family:"Courier =
New"'> 



ProductID=3D"olivier dorie" w:st=3D"on"> New"> lang=3DEN-GB style=3D'font-size:10.0pt;font-family:"Courier =
New"'>olivier dorie
size=3D2 face=3D"Courier New"> style=3D'font-size:10.0pt;font-family:
"Courier New"'> wrote:



face=3D"Courier New"> lang=3DEN-GB style=3D'font-size:10.0pt;font-family:"Courier New"'>> =
Hiroshi,



face=3D"Courier New"> lang=3DEN-GB style=3D'font-size:10.0pt;font-family:"Courier New"'>> =



face=3D"Courier New"> lang=3DEN-GB style=3D'font-size:10.0pt;font-family:"Courier New"'>> =
Thank you
for your answer.



face=3D"Courier New"> lang=3DEN-GB style=3D'font-size:10.0pt;font-family:"Courier New"'>> =



face=3D"Courier New"> lang=3DEN-GB style=3D'font-size:10.0pt;font-family:"Courier New"'>> I =
try the 2
solutions (BeginTrans and the driver 8.4.0100) and the two =



face=3D"Courier New"> lang=3DEN-GB style=3D'font-size:10.0pt;font-family:"Courier New"'>> =
of them
work: in the small test, I describe in the last mail, the =



face=3D"Courier New"> lang=3DEN-GB style=3D'font-size:10.0pt;font-family:"Courier New"'>> =
transaction
is serializable.



face=3D"Courier New"> lang=3DEN-GB style=3D'font-size:10.0pt;font-family:"Courier New"'>> =



face=3D"Courier New"> lang=3DEN-GB style=3D'font-size:10.0pt;font-family:"Courier New"'>> I =
have a
last question: with BeginTrans or with the driver  8.4.0100, =



face=3D"Courier New"> lang=3DEN-GB style=3D'font-size:10.0pt;font-family:"Courier New"'>> =
the
transaction isolation level is every time serializable =
?



face=3D"Courier New"> lang=3DEN-GB style=3D'font-size:10.0pt;font-family:"Courier =
New"'> 



face=3D"Courier New"> lang=3DEN-GB style=3D'font-size:10.0pt;font-family:"Courier New"'>Why do =
you think
so?



face=3D"Courier New"> lang=3DEN-GB style=3D'font-size:10.0pt;font-family:"Courier New"'>Your =
example
doesn't seem to show us the difference.



face=3D"Courier New"> lang=3DEN-GB style=3D'font-size:10.0pt;font-family:"Courier =
New"'> 



face=3D"Courier New"> lang=3DEN-GB style=3D'font-size:10.0pt;font-family:"Courier =
New"'> > Is it
possible to



face=3D"Courier New"> lang=3DEN-GB style=3D'font-size:10.0pt;font-family:"Courier New"'>> =
have a read
committed level?



face=3D"Courier New"> lang=3DEN-GB style=3D'font-size:10.0pt;font-family:"Courier =
New"'> 



face=3D"Courier New"> lang=3DEN-GB style=3D'font-size:10.0pt;font-family:"Courier New"'>It's =
determined
by the server setting. The default is read =
committed.



face=3D"Courier New"> lang=3DEN-GB style=3D'font-size:10.0pt;font-family:"Courier =
New"'> 



face=3D"Courier New"> style=3D'font-size:10.0pt;font-family:"Courier =
New"'>regards,



face=3D"Courier New"> style=3D'font-size:10.0pt;font-family:"Courier New"'>Hiroshi =
Inoue



style=3D'font-size:
10.0pt;font-family:Tahoma'> 



style=3D'font-size:
10.0pt;font-family:Tahoma'> 



style=3D'font-size:
10.0pt;font-family:Arial'> 









------=_NextPart_000_02AF_01C9B90B.888A3EB0--

Re: driver ODBC-PostreSQL, cursor and transaction isolation

am 09.04.2009 16:14:23 von Richard Broersma

On Thu, Apr 9, 2009 at 3:05 AM, olivier dorie wrote:

> Since, I have made others tests with begintrans with (the driver 8.4.0100
> and the driver 8.3.4):
>
> ·       =A0 No dirty read
> ·       =A0 Read committed
> ·       =A0 Serializable
>
> I use the server settings or ExecuteSQL(=93SET ISOLATION LEVEL =85.=94)
> All tests give good results.

Only Read Committed and Serializable are implemented in PostgreSQL all
other isolation levels default to one of these two:

http://www.postgresql.org/docs/8.3/interactive/sql-set-trans action.html


--=20
Regards,
Richard Broersma Jr.

Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

--=20
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc