Re: set-level update fails with unique constraint violation

Поиск
Список
Период
Сортировка
Искать
От
Magnus Hagander
Тема
Re: set-level update fails with unique constraint violation
Дата
Msg-id
9837222c0912310752w1a5c22ddr38a3023dcc65b064@mail.gmail.com
Ответ на
set-level update fails with unique constraint violation (neuhauser+pgsql-general#postgresql.org@sigpipe.cz)
Список
Дерево обсуждения
set-level update fails with unique constraint violation neuhauser+pgsql-general#postgresql.org@sigpipe.cz
Re: set-level update fails with unique constraint violation David Fetter <david@fetter.org>
Re: set-level update fails with unique constraint violation Roman Neuhauser <neuhauser@sigpipe.cz>
Re: set-level update fails with unique constraint violation Scott Marlowe <scott.marlowe@gmail.com>
Re: set-level update fails with unique constraint violation Roman Neuhauser <neuhauser@sigpipe.cz>
Re: set-level update fails with unique constraint violation David Fetter <david@fetter.org>
Re: set-level update fails with unique constraint violation "Daniel Verite" <daniel@manitou-mail.org>
Re: set-level update fails with unique constraint violation Dean Rasheed <dean.a.rasheed@googlemail.com>
Re: set-level update fails with unique constraint violation "Daniel Verite" <daniel@manitou-mail.org>
Re: set-level update fails with unique constraint violation Tom Lane <tgl@sss.pgh.pa.us>
Re: set-level update fails with unique constraint violation "Daniel Verite" <daniel@manitou-mail.org>
Re: set-level update fails with unique constraint violation Tom Lane <tgl@sss.pgh.pa.us>
Re: set-level update fails with unique constraint violation Dean Rasheed <dean.a.rasheed@googlemail.com>
Re: set-level update fails with unique constraint violation Magnus Hagander <magnus@hagander.net>
Re: set-level update fails with unique constraint violation Jayadevan M <Jayadevan.Maymala@ibsplc.com>
Re: set-level update fails with unique constraint violation Roman Neuhauser <neuhauser+pgsql-general#postgresql.org@sigpipe.cz>
Re: set-level update fails with unique constraint violation Dean Rasheed <dean.a.rasheed@googlemail.com>
2009/12/31 neuhauser+pgsql-general#postgresql.org
:
> Hello,
>
> this fails with "duplicate key value":
>
>    CREATE TABLE x (
>      i INT NOT NULL UNIQUE
>    );
>    INSERT INTO x (i) VALUES (1), (2), (3);
>    UPDATE x SET i = i + 1;
>
> are there any plans to make this work?

Sure. 8.5 (current alpha release included) will let you do
i INT NOT NULL UNIQUE DEFERRABLE

which will make that work.

(you might want to consider using an actual email address if you want
to get responses to your questions in the future)

-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/
В списке pgsql-general по дате отправления
От: neuhauser+pgsql-general#postgresql.org@sigpipe.cz
Дата:
От: David Fetter
Дата:
FAQ