Re: select ... for update limit 1

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: select ... for update limit 1
Дата
Msg-id 21160.982561910@sss.pgh.pa.us
обсуждение исходный текст
Ответ на select ... for update limit 1  (Lincoln Yeoh <lyeoh@pop.jaring.my>)
Список pgsql-general
Lincoln Yeoh <lyeoh@pop.jaring.my> writes:
> Right now select for update limit 1 seems to lock all rows in the where
> clause, not just retrieved rows.

This claim surprises me quite a lot, since the FOR UPDATE locking occurs
at the outer level of the executor where rows are about to be returned.
And I can't duplicate your result in a simple test.  Could you post a
reproducible example?

            regards, tom lane

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

Предыдущее
От: Lincoln Yeoh
Дата:
Сообщение: Re: select ... for update limit 1
Следующее
От: MMM
Дата:
Сообщение: Foreign keys