Re: libpq program SELECT FOR UPDATE and TIMEOUT or CANCEL REQUEST

From: Christoph Haller <ch(at)rodos(dot)fzk(dot)de>
To: pgsql-sql(at)postgresql(dot)org
Cc: jrpogo(at)yahoo(dot)com
Subject: Re: libpq program SELECT FOR UPDATE and TIMEOUT or CANCEL REQUEST
Date: 2003-05-23 11:16:16
Message-ID: 3ECE0300.4D57E12F@rodos.fzk.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

>
> I am programming using libpq under Linux.
>
> When I do a "select ... for update" to lock a row, how=20
> would I allow user to cancel or timeout when requesting the
> the same row from another program/transaction.
>
> I do not want the user to have to wait for the update on the=20
> other end. I would rather send the user an error message
> saying that the record is LOCKED -- try again later.
>
> If you could send me an example that would be great!
>
There was a strongly related discussion on the pgsql-sql list in
February 2003. Search the archives for threads
"Lock timeout detection"
"Can pessimistic locking be emulated?"
If you're having trouble to find those, contact me again.
I recorded the major important stuff - at least I think.
Regards, Christoph

Browse pgsql-sql by date

  From Date Subject
Next Message Oliver Elphick 2003-05-23 11:18:59 Re: language "plpgsql" does not exist
Previous Message Rod Taylor 2003-05-23 11:10:39 Re: language "plpgsql" does not exist