SELECT ... FOR UPDATE and ResultSet

Поиск
Список
Период
Сортировка
От Jeffrey Tenny
Тема SELECT ... FOR UPDATE and ResultSet
Дата
Msg-id 3FF4C8D9.10102@comcast.net
обсуждение исходный текст
Ответы Re: SELECT ... FOR UPDATE and ResultSet  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-jdbc
PostgreSQL will lock the rows identified by SELECT ... FOR UPDATE
even if I don't do anything with the ResultSet after
statement.executeQuery(),
at least in simple tests.

Is this the semantically correct result from a database standards
standpoint?
Can I count on this behavior for PostgreSQL?  Or will it fail to lock
all rows if
I have a sufficiently large ResultSet and Connection.setFetchSize() does
it's magic?

I notice that there is PostgreSQL documentation saying that the FOR
UPDATE stuff
logically happens after LIMIT.  The same logic might then conceptually
apply to ResultSets that don't acquire all query results from the server.

Thanks for any tips.



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

Предыдущее
От: Jeffrey Tenny
Дата:
Сообщение: PostgreSQL design question
Следующее
От: Tom Lane
Дата:
Сообщение: Re: SELECT ... FOR UPDATE and ResultSet