Re: Select for insert possible?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Select for insert possible?
Дата
Msg-id 11210.985537707@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Select for insert possible?  (Lincoln Yeoh <lyeoh@pop.jaring.my>)
Список pgsql-general
Lincoln Yeoh <lyeoh@pop.jaring.my> writes:
> So I'll use "lock table" (this time in exclusive mode :) ), then select for
> update, then insert|update and leave the unique index to trigger an error
> when I forget to all that correctly, in which case it's definitely an error.

If you're holding an exclusive-mode lock then there's no need to do the
select FOR UPDATE; there can be no other lock holder.

            regards, tom lane

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

Предыдущее
От: "Christian Marschalek"
Дата:
Сообщение: RE: Views...
Следующее
От: Boris
Дата:
Сообщение: Some interesting errorcodes (FreeBSD) PG 7.1 from cvs