Re: Insert behavior in transaction

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Insert behavior in transaction
Дата
Msg-id 17391.1119229734@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Insert behavior in transaction  ("Andres" <andres1981@gawab.com>)
Ответы Re: Insert behavior in transaction  ("Andres" <andres1981@gawab.com>)
Список pgsql-general
"Andres" <andres1981@gawab.com> writes:
> I did this simple test and it fails too.

> BEGIN (first transaction)
> INSERT INTO mytable VALUES(1);

> On other client
> BEGIN (second transaction)
> INSERT INTO mytable VALUES(0);
> INSERT INTO mytable VALUES(1);

> and it freezes waiting for the first o commit or rollback

Not too surprising if the second insert would imply a unique-key
violation.  It has to wait to see if the first insertion of "1"
is going to commit or not.

            regards, tom lane

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

Предыдущее
От: "Grant Morgan"
Дата:
Сообщение: unicode and =
Следующее
От: Tom Lane
Дата:
Сообщение: Re: unicode and =