Re: SELECT ... FOR UPDATE and ResultSet

Поиск
Список
Период
Сортировка
От Barry Lind
Тема Re: SELECT ... FOR UPDATE and ResultSet
Дата
Msg-id 3FF9C503.90606@xythos.com
обсуждение исходный текст
Ответ на Re: SELECT ... FOR UPDATE and ResultSet  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-jdbc
Jeff,

I don't know if you are trying to support multiple databases or not, but
this behavior does vary across databases.  In DB2 for example only the
current row your cursor is on is locked, Oracle will lock all rows that
satisfy the query (even if you never fetch them all).

--Barry

Tom Lane wrote:

> Jeffrey Tenny <jeffrey.tenny@comcast.net> writes:
>
>>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?
>
>
> In the current implementation, the backend will only lock those rows
> actually returned to the client.  If setFetchSize() causes not all the
> rows to be fetched, you lose ...
>
>             regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
>       joining column's datatypes do not match
>


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] PL/Java issues
Следующее
От: "George Lessmann"
Дата:
Сообщение: Re: odd jdbc driver synchronization issue