Select For Update question

Поиск
Список
Период
Сортировка
От Jean-Christian Imbeault
Тема Select For Update question
Дата
Msg-id 3E8146AA.60804@mega-bucks.co.jp
обсуждение исходный текст
Ответы Re: Select For Update question
Список pgsql-jdbc
I would like to use a SELECT ... FOR UPDATE statement in my Java program
in order to lock some rows while I do some work on them. However either
I don't understand how to use the JDBC connection properly of the FOR
UPDATE construct doesn't work with the JDBC driver.

As a test case I built a small GUI with just one button. When I click
the button the following sql is executed:

"select * from test for update";

While the GUI is still open I open a psql console and I am capable of
manually updating the rows in the test table ... they are not locked as
I had hoped.

What is the proper way to use select .. for update with the JDC driver?
Can someone point me to some example or documentation?

Thanks,

Jean-Christian Imbeault


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

Предыдущее
От: Jean-Christian Imbeault
Дата:
Сообщение: jdbc.postgresql.org
Следующее
От: Barry Lind
Дата:
Сообщение: Re: jdbc.postgresql.org