pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim Dossey <jfd@mercury.net>
To: pgsql-interfaces@postgresql.org
Subject: libpq: checking for record locks
Date: Mon, 17 May 1999 21:39:52 -0400
Message-ID: <3740C4E8.AEA10070@mercury.net> (raw)

I'm trying to convert an existing application to postgresql 6.5.  I'm
using 6.5 because we need the "FOR UPDATE" clause in the SELECT
statement.  This is an interactive application and files locks would not
be acceptable.

I would like to find a way to detect if PQexec() or PQsendQuery() on a
"SELECT ... FOR UPDATE" command are blocked because one or more if the
records we are trying to select are locked by other transactions.  I
don't want the users waiting on a SELECT when the records they want are
in use by another user, and we don't know when they will be freed.

Thanks for any and all help,
-- 
-----------------------------------------------------------------------   
Jim Dossey                                       mailto:jfd@mercury.net



Message-ID: <3740C4E8.AEA10070@mercury.net>
Permalink:  ../3740C4E8.AEA10070@mercury.net/
Also on:    postgresql.org/message-id/3740C4E8.AEA10070@mercury.net

 · 

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-interfaces@postgresql.org
  Cc: jfd@mercury.net
  Subject: Re: libpq: checking for record locks
  In-Reply-To: <3740C4E8.AEA10070@mercury.net>

* 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