agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: Loïc Bourgeois <loic.bourgeois@mobileway.com>
To: pgsql-sql@postgresql.org
Subject: SELECT ... FOR UPDATE
Date: Thu, 05 Apr 2001 14:29:43 +0200
Message-ID: <3ACC6537.9080200@mobileway.com> (raw)

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).












view thread (17+ messages)  latest in thread

Message-ID: <3ACC6537.9080200@mobileway.com>
Permalink:  ../3ACC6537.9080200@mobileway.com/
Also on:    postgresql.org/message-id/3ACC6537.9080200@mobileway.com

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-sql@postgresql.org
  Cc: loic.bourgeois@mobileway.com
  Subject: Re: SELECT ... FOR UPDATE
  In-Reply-To: <3ACC6537.9080200@mobileway.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox