X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 71598D1B947 for ; Thu, 28 Aug 2003 08:24:55 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 79939-07 for ; Thu, 28 Aug 2003 05:24:19 -0300 (ADT) Received: from kogut2.o2.pl (kogut2.o2.pl [212.126.20.58]) by svr1.postgresql.org (Postfix) with ESMTP id 60870D1B52C for ; Thu, 28 Aug 2003 05:24:16 -0300 (ADT) Received: from daniel (mx0.helion.pl [213.216.84.147]) by kogut2.o2.pl (Postfix) with SMTP id 1D7DB72A75 for ; Thu, 28 Aug 2003 10:24:16 +0200 (CEST) Message-ID: <002301c36d3d$baf7f1f0$2601a8c0@gliwice.helion.com.pl> From: =?iso-8859-2?Q?Daniel_Micha=B3?= To: Subject: lock row in table Date: Thu, 28 Aug 2003 10:23:58 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0020_01C36D4E.7DC64B90" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.6 tagged_above=0.0 required=5.0 tests=HTML_30_40 X-Spam-Level: X-Archive-Number: 200308/339 X-Sequence-Number: 14955 This is a multi-part message in MIME format. ------=_NextPart_000_0020_01C36D4E.7DC64B90 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable Hallo everybody, I have a problem that I can not to solve in a simple way.=20 SOME INFORMATION: I have a postgresql database version 7.2.2 on Linux platform. I communicate= with Postgresql from a Delphi application using microolap drivers and eve= rything works fine. PROBLEM DESCRIPTION: I have to lock one row in table1 for user1. In the same time other users sh= ould be able to read this record but when other user for example user2 want= to edit this record user2 should get information "The row you try to edit= is currently edit" - or sometihing similar. Of course I can lock record with syntax "Begin; select * from table1 where = ID=3D12 for update; update table1 set field1=3D"New value" where ID=3D12; c= ommit;" but I can not to inform other user that the record is edited? MAIN TARGET: How to get information that current record is edited? Which function can I = use? Please help me, Maybe someone have similar problem?=20 Greetings, Daniel ------=_NextPart_000_0020_01C36D4E.7DC64B90 Content-Type: text/html; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable
Hallo everybody,
I have a problem that I can not to solve i= n a=20 simple way.
 
SOME INFORMATION:
I have a postgresql database version 7.2.2= on Linux=20 platform. I communicate with Postgresql from a Delphi application using=20 microolap drivers and  everything works fine.
 
PROBLEM DESCRIPTION:
I have to lock one row in table1 for user1= . In the=20 same time other users should be able to read this record but when other use= r for=20 example user2 want to edit this record  user2 should get information "= The=20 row you try to edit is currently edit" - or sometihing similar.
 
Of course I can lock record with syntax "B= egin;=20 select * from table1 where ID=3D12 for update; update table1 set field= 1=3D"New=20 value" where ID=3D12; commit;"
but I can not to inform other user that th= e record=20 is edited?
 
MAIN TARGET:
How to get information that current record= is=20 edited? Which function can I use?
 
Please help me, Maybe someone have similar= problem?=20
Greetings,
Daniel
 
------=_NextPart_000_0020_01C36D4E.7DC64B90--