Problem JDBC, AutoCommit ON and SELECT FOR UPDATE

Поиск
Список
Период
Сортировка
От Philippe EMERIAUD
Тема Problem JDBC, AutoCommit ON and SELECT FOR UPDATE
Дата
Msg-id OF493CD29D.2988C2D6-ONC1257E00.005A174C-C1257E00.005A7021@ordirope.fr
обсуждение исходный текст
Ответы Re: Problem JDBC, AutoCommit ON and SELECT FOR UPDATE
Re: Problem JDBC, AutoCommit ON and SELECT FOR UPDATE
Re: Problem JDBC, AutoCommit ON and SELECT FOR UPDATE
Список pgsql-general
Hi all,
We have an application based on DB2 database, We are testing this same application on PostgreSQL database. By default we are in autocommit on mode.
On DB2 (and Oracle), the query SELECT FOR UPDATE locks the row until the resultset is closed. On PostgreSQL database (all versions) this same query never locks (because we are in autocommit on mode). But this is a bad implementation of JDBC specification : "If a connection is in auto-commit mode, then all its SQL statements will be executed and committed as individual transactions.[...] The commit occurs when the statement completes or the next execute occurs, whichever comes first. In the case of statements returning a ResultSet object, the statement completes when the last row of the ResultSet object has been retrieved or the ResultSet object has been closed."
Is it possible to lock row in autocommit on mode on PostgreSQL database ?

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

Предыдущее
От: Oleg Bartunov
Дата:
Сообщение: Re: Find similar records (compare tsvectors)
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Problem JDBC, AutoCommit ON and SELECT FOR UPDATE