Re: atomic function

Поиск
Список
Период
Сортировка
От Mage
Тема Re: atomic function
Дата
Msg-id 4301B191.80401@mage.hu
обсуждение исходный текст
Ответ на Re: atomic function  (Dennis Bjorklund <db@zigo.dhs.org>)
Список pgsql-general
Dennis Bjorklund wrote:

>On Mon, 15 Aug 2005, Mage wrote:
>
>
>
>>2005-08-12 19:08:43: ERROR:  duplicate key violates unique constraint
>>"common_adviewnum_adid_site_day_index"
>>
>>
>
>Between your select and your insert someone else inserted a row making the
>insert fail.
>
>
I see. I thought that the function will be atomic but I was wrong.

>See this example of how you can update or insert depending on what is in
>the table:
>
>http://developer.postgresql.org/docs/postgres/plpgsql-control-structures.html#PLPGSQL-UPSERT-EXAMPLE
>
>
Or should I simply lock the table?

       Mage



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

Предыдущее
От: "Magnus Hagander"
Дата:
Сообщение: Re: ~/pgpass
Следующее
От: "Surabhi Ahuja "
Дата:
Сообщение: regarding isolation amongst threads