Re: incrementing without violating a constraint

Поиск
Список
Период
Сортировка
От Michael P. Soulier
Тема Re: incrementing without violating a constraint
Дата
Msg-id 20140120144001.GP23196@mitel.com
обсуждение исходный текст
Ответ на incrementing without violating a constraint  ("Michael P. Soulier" <michael_soulier@mitel.com>)
Ответы Re: incrementing without violating a constraint
Re: incrementing without violating a constraint
Список pgsql-general
On 20/01/14 Michael P. Soulier said:

> This violates the uniquness constraint. Is there a way to say, turn off the
> constraint, run the update and then turn it back on?

Hmm. This didn't work.

tugdb=# SET CONSTRAINTS ALL DEFERRED;
SET CONSTRAINTS
tugdb=# update siptrunkroutingrules set rule_number = rule_number + 1;
ERROR:  duplicate key value violates unique constraint
"siptrunkroutingrules_unique_trunk_rule_number"

Mike

Вложения

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

Предыдущее
От: "Michael P. Soulier"
Дата:
Сообщение: incrementing without violating a constraint
Следующее
От: Andreas Kretschmer
Дата:
Сообщение: Re: incrementing without violating a constraint