Re: Feature: FOR UPDATE SKIP LOCKED

From: Csaba Nagy <nagy(at)ecircle-ag(dot)com>
To: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
Cc: Postgres general mailing list <pgsql-general(at)postgresql(dot)org>
Subject: Re: Feature: FOR UPDATE SKIP LOCKED
Date: 2008-07-09 08:45:00
Message-ID: 1215593100.2311.25.camel@PCD12478
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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...

Cheers,
Csaba.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2008-07-09 08:52:19 Re: Feature: FOR UPDATE SKIP LOCKED
Previous Message Bright D.L. 2008-07-09 08:32:11 SELECT Query returns empty