SELECT ... FOR UPDATE

Поиск
Список
Период
Сортировка
От Loïc Bourgeois
Тема SELECT ... FOR UPDATE
Дата
Msg-id 3ACC6537.9080200@mobileway.com
обсуждение исходный текст
Список pgsql-sql
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).











В списке pgsql-sql по дате отправления:

Предыдущее
От: "Richard Huxton"
Дата:
Сообщение: Re: Index on View ?
Следующее
От: Tim Perdue
Дата:
Сообщение: Re: Memory and performance