Re: UNIQUE INDEX unaware of transactions (a spin ofquestion)

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема Re: UNIQUE INDEX unaware of transactions (a spin ofquestion)
Дата
Msg-id 3B2DD6D0.3D16636@tm.ee
обсуждение исходный текст
Ответ на Re: UNIQUE INDEX unaware of transactions (a spin of question)  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: UNIQUE INDEX unaware of transactions (a spin ofquestion)  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Peter Eisentraut wrote:
> 
> Jarmo Paavilainen writes:
> 
> > *I think* this is correct behaviour, ie all that one transaction does should
> > be visible to other transactions.
> 
> Only in the "read uncommitted" transaction isolation level, which
> PostgreSQL does not provide and isn't really that useful.
> 

...

> 
> You can try yourself how PostgreSQL handles this, which is probably not
> the right thing since unique contraints are not correctly transaction
> aware.

Is there any way to make unique indexes transaction-aware ?

Are competeing updates on unique indexes transaction-aware ?

I.e. can I be sure that if I do 

begin;
if select where key=1 result exists
then update where key=1
else insert(key,...)values(1,...)
end;

then this will have the expected behaviour in presence of multiple 
concurrent updaters?

------------------
Hannu


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

Предыдущее
От: Oleg Bartunov
Дата:
Сообщение: initdb from current cvs failed
Следующее
От: Hannu Krosing
Дата:
Сообщение: Re: Update on Access 97 and = NULL