Selecting a non-locked row.

From: Kurt Roeckx <Q(at)ping(dot)be>
To: pgsql-sql(at)postgresql(dot)org
Subject: Selecting a non-locked row.
Date: 2003-01-19 13:33:20
Message-ID: 20030119133320.GA3984@ping.be
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I'm in the process of writing an application, and I'm not sure
how to properly solve it.

I have a table with records in, and they either still need to be
processed or not. Several people will be using the table at the
same time.

I was thinking about using a select .... for update limit 1, but
the other persons will of course try to select the same record
and wait until that one is released. The locks are held for a
long period of time.

Is there a way to select a row that is not locked yet?

Kurt

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2003-01-19 21:26:10 Re: Selecting a non-locked row.
Previous Message Harry Yau 2003-01-18 06:16:09 Problem with COPY FROM