Re: Feature: FOR UPDATE SKIP LOCKED

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Feature: FOR UPDATE SKIP LOCKED
Дата
Msg-id 48747C43.5080401@postnewspapers.com.au
обсуждение исходный текст
Ответ на Re: Feature: FOR UPDATE SKIP LOCKED  (Csaba Nagy <nagy@ecircle-ag.com>)
Список pgsql-general
Csaba Nagy wrote:
> On Wed, 2008-07-09 at 16:23 +0800, Craig Ringer wrote:
>> Especially if it returned an updated row count or supported the
>> RETURNING clause, so you could find out after the fact what was or
>> wasn't done.
>
> Well, it is supposed to be used as "SELECT ... FOR UPDATE SKIP LOCKED",
> so you can in fact put the locked row ids in the target list. With a
> "LIMIT 1" appended would be the perfect way to check out the next queue
> item to process...

That makes sense. I was thinking of UPDATE ... SKIP LOCKED RETURNING
instead, which could be handy in similar situations.

--
Craig Ringer

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

Предыдущее
От: "Bright D.L."
Дата:
Сообщение: SELECT Query returns empty
Следующее
От: Thomas Markus
Дата:
Сообщение: Re: SELECT Query returns empty