"no wait" option for locks - Mailing list pgsql-sql

From Daniel Stüwe
Subject "no wait" option for locks
Date
Msg-id 000801c2311c$b37bde40$0f64a8c0@aus.de
Whole thread Raw
Responses Re: 'no wait' option for locks  (<mallah@trade-india.com>)
List pgsql-sql
Hi...

anyone knows a workaround for Oracles "no wait" option in "SELECT ...
FOR UPDATE"? 

I wrote a programm which runs twice. Both poll the pgsql database all 5
seconds and make an "SELECT ... FOR UPDATE" for the first row found.
After some work and commit the next row is processed. The second task
waits until the first hast commited, but it should detect the lock and
continue work with next row.

How can i detect this lock? Oracle returns with "no wait" option an sql
error code.

Any hints?

best regards
Daniel Stuewe  



pgsql-sql by date:

Previous
From: Rudi Starcevic
Date:
Subject: Float / Numeric ?
Next
From:
Date:
Subject: Re: 'no wait' option for locks