Re: conflict txns in serialization isolation

Поиск
Список
Период
Сортировка
От Yi LIN
Тема Re: conflict txns in serialization isolation
Дата
Msg-id Pine.GSO.4.44.0407261347370.29092-100000@willy
обсуждение исходный текст
Ответ на Re: conflict txns in serialization isolation  (Kris Jurka <books@ejurka.com>)
Список 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


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Problem w/ IDENT authentication
Следующее
От: Ian Pilcher
Дата:
Сообщение: Re: Problem w/ IDENT authentication