libpq program SELECT FOR UPDATE and TIMEOUT or CANCEL REQUEST

From: jrpogo(at)yahoo(dot)com (Jeffrey Pogodzinski)
To: pgsql-sql(at)postgresql(dot)org
Subject: libpq program SELECT FOR UPDATE and TIMEOUT or CANCEL REQUEST
Date: 2003-05-19 17:55:23
Message-ID: 11c19c42.0305190955.967d34@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,

I am programming using libpq under Linux.

When I do a "select ... for update" to lock a row, how
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
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!

Thanks for your help.

Jeff.

jpogo(at)imcg(dot)com

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Jeff Boes 2003-05-19 19:11:48 Performance on temp table inserts
Previous Message Jan Wieck 2003-05-19 17:40:20 Re: Can arrays reference primary keys in CREATE TABLE?