BUG #2393: update fails with unique constraint violation

From: "Laurence Dawson" <larry(dot)dawson(at)vanderbilt(dot)edu>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #2393: update fails with unique constraint violation
Date: 2006-04-13 22:14:22
Message-ID: 200604132214.k3DMEMk5054415@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 2393
Logged by: Laurence Dawson
Email address: larry(dot)dawson(at)vanderbilt(dot)edu
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=>

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2006-04-14 00:41:06 Re: Permission denied on fsync / Win32 (was right
Previous Message Dave Page 2006-04-13 20:38:01 Re: BUG #2386: pg_restore doesn't restore large objects