pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: jrpogo@yahoo.com
To: pgsql-sql@postgresql.org
Subject: libpq program SELECT FOR UPDATE and TIMEOUT or CANCEL REQUEST
Date: 19 May 2003 10:55:23 -0700
Message-ID: <11c19c42.0305190955.967d34@posting.google.com> (raw)

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@imcg.com



view thread (4+ messages)  latest in thread

Message-ID: <11c19c42.0305190955.967d34@posting.google.com>
Permalink:  ../11c19c42.0305190955.967d34@posting.google.com/
Also on:    postgresql.org/message-id/11c19c42.0305190955.967d34@posting.google.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: jrpogo@yahoo.com
  Subject: Re: libpq program SELECT FOR UPDATE and TIMEOUT or CANCEL REQUEST
  In-Reply-To: <11c19c42.0305190955.967d34@posting.google.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox