The following bug has been logged online:

Bug reference:      2393
Logged by:          Laurence Dawson
Email address:      [EMAIL PROTECTED]
PostgreSQL version: 8.1.3
Operating system:   Ubuntu Dapper Drake
Description:        update fails with unique constraint violation
Details: 

Here is the table definition:

CREATE TABLE test.test
(
  a int4 NOT NULL DEFAULT nextval('test.test_a_seq'::regclass),
  CONSTRAINT pk PRIMARY KEY (a)
) 
WITHOUT OIDS;
ALTER TABLE test.test OWNER TO lstore;


And then try an update:
lstore=> select * from test.test;
 a
----
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
(10 rows)

lstore=> update test.test set a = a + 2 where a >= 3;
ERROR:  duplicate key violates unique constraint "pk"
lstore=>

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

               http://www.postgresql.org/docs/faq

Reply via email to