Received: from mail.mobileway.com ([212.155.187.171]) by postgresql.org (8.11.3/8.11.1) with SMTP id f35CTo821021 for ; Thu, 5 Apr 2001 08:29:50 -0400 (EDT) (envelope-from loic.bourgeois@mobileway.com) Received: (qmail 3694 invoked from network); 5 Apr 2001 12:29:43 -0000 Received: from chablis.local (HELO mobileway.com) (192.168.1.65) by mailadmin.local with SMTP; 5 Apr 2001 12:29:43 -0000 Message-ID: <3ACC6537.9080200@mobileway.com> Date: Thu, 05 Apr 2001 14:29:43 +0200 From: =?ISO-8859-1?Q?Lo=EFc?= Bourgeois Organization: MobileWay User-Agent: Mozilla/5.0 (X11; U; Linux 2.2.12-32 i686; en-US; m18) Gecko/20010131 Netscape6/6.01 X-Accept-Language: en, fr MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: SELECT ... FOR UPDATE Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Archive-Number: 200104/76 X-Sequence-Number: 2416 I have to create a program to use the lastest version of PostgreSQL. Many processes of this program must run in parallele. In a table I have to select some specific row next insert a new row with the same search carateristiques and commit. But between the select and the insert action none other proccesses execute the same research parameters (which must return the same lines) before the commit of the first process. Or the result of the second select must contain the insert result of the precedent process. I known I must use SELECT FOR UPDATE and or BEGIN section with lock table. What is the lock option mode. Thanks a lot for all the informations. For resume I would like to do a SELECT ... FOR UPDATE with the option NOWAIT (cf. ORACLE instruction).