X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id C9A2AD1BB74 for ; Fri, 23 Apr 2004 07:03:04 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 46591-07 for ; Fri, 23 Apr 2004 07:03:05 -0300 (ADT) Received: from curie.credativ.org (credativ.com [217.160.209.18]) by svr1.postgresql.org (Postfix) with ESMTP id CD45BD1BB4C for ; Fri, 23 Apr 2004 07:03:02 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by curie.credativ.org (Postfix) with ESMTP id 33F3055EFA; Fri, 23 Apr 2004 12:03:05 +0200 (CEST) Received: from www.credativ.de (p50926B95.dip.t-dialin.net [80.146.107.149]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by curie.credativ.org (Postfix) with ESMTP id B6B4755EF7; Fri, 23 Apr 2004 12:03:04 +0200 (CEST) Received: from bell.credativ.de (bell.credativ.de [172.26.14.16]) by www.credativ.de (Postfix) with ESMTP id E15211C01D5; Fri, 23 Apr 2004 12:03:02 +0200 (CEST) From: Peter Eisentraut To: "Denis P Gohel" , Subject: Re: Record Lock details Date: Fri, 23 Apr 2004 12:03:01 +0200 User-Agent: KMail/1.5.4 References: <001201c4290f$1ecb3a60$3332a8c0@DENIS> In-Reply-To: <001201c4290f$1ecb3a60$3332a8c0@DENIS> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200404231203.01835.peter_e@gmx.net> X-Virus-Scanned: by AMaViS at credativ.com X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.2 tagged_above=0.0 required=5.0 tests=RCVD_IN_NJABL, RCVD_IN_SORBS X-Spam-Level: X-Archive-Number: 200404/253 X-Sequence-Number: 17628 Am Freitag, 23. April 2004 10:43 schrieb Denis P Gohel: > Is there a data dictionary in Postgres from where i can get the info about > locked rows of any table ? If possible the value of those locked record ? No, this information is not available for end users. > I have an ODBC application working on Postgres. There are Master child > tables. I want, if a user A is editing any document ( one master and set of > child records) in front-end application, the same should not be available > to other user for editing. > > I thought of using SELECT FOR UPDATE. But, in my case, i need to display > the name of application user and other details about the locked row. Keeping in mind that long-running transactions are not a good idea anyway, you should probably consider a user-space cooperative locking model. There is something in contrib/userlock, but I'm not sure whether that fits what you need.