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 Andreas Kretschmer <andreas@a-kretschmer.de>
Re: incrementing without violating a constraint "Michael P. Soulier" <michael_soulier@mitel.com>
Re: incrementing without violating a constraint Tom Lane <tgl@sss.pgh.pa.us>
Re: incrementing without violating a constraint Adrian Klaver <adrian.klaver@gmail.com>
Re: incrementing without violating a constraint Alban Hertroys <haramrae@gmail.com>
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
Дата:
От: Andreas Kretschmer
Дата:
FAQ