[EMAIL PROTECTED] wrote:

> and a UNIQUE INDEX on columns "groupid,orderby"
> 
> now i want to update
> 
> UPDATE
> orderby SET orderby = orderby +10
> WHERE groupid = 1;
> 
> -> FAILS because of UNIQUE INDEX

This is a Known Issue(tm).  (A "gotcha", some would say).

http://archives.postgresql.org/pgsql-sql/2004-10/msg00146.php
Surely you can find better references in the archives, but I'm too lazy.
(keywords: "deferrable unique constraint")

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq
  • Re: [BUGS] Alvaro Herrera

Reply via email to