Re: conflict txns in serialization isolation

From: Yi LIN <ylin30(at)cs(dot)mcgill(dot)ca>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: conflict txns in serialization isolation
Date: 2004-07-26 17:49:34
Message-ID: Pine.GSO.4.44.0407261347370.29092-100000@willy
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi Kris:

> > db = DriverManager.getConnection(url, username, password);
> > db.setAutoCommit(false);
> > db.setTransactionIsolation(java.sql.Connection.TRANSACTION_SERIALIZABLE);
> >
>
> I think you want to set the transaction isolation before starting the
> transaction by turning off autocommit. Later versions of the driver make
> this work correctly or throw an error on this situation, but I recall you
> were using an old version. So try reordering the last two lines.

Now it works correctly as psql. Thanks a lot!

Yi Lin

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Tom Lane 2004-07-26 18:11:38 Re: Binary Cursors, and the COPY command
Previous Message Tom Lane 2004-07-26 17:41:51 Re: Problem w/ IDENT authentication