X-Original-To: pgsql-sql@postgresql.org Received: from localhost (unknown [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id 9A09E924FB8 for ; Mon, 19 May 2003 17:47:12 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 24893-10 for ; Mon, 19 May 2003 17:47:07 -0400 (EDT) Received: from news.hub.org (unknown [64.117.225.234]) by developer.postgresql.org (Postfix) with ESMTP id 121389259C6 for ; Mon, 19 May 2003 13:55:36 -0400 (EDT) Received: by news.hub.org (Postfix, from userid 8) id 923152537D1; Mon, 19 May 2003 13:55:33 -0400 (EDT) From: jrpogo@yahoo.com (Jeffrey Pogodzinski) X-Newsgroups: comp.databases.postgresql.sql Subject: libpq program SELECT FOR UPDATE and TIMEOUT or CANCEL REQUEST Date: 19 May 2003 10:55:23 -0700 Organization: http://groups.google.com/ Lines: 19 Message-ID: <11c19c42.0305190955.967d34@posting.google.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: groups-abuse@google.com To: pgsql-sql@postgresql.org X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/431 X-Sequence-Number: 13596 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