BUG #2393: update fails with unique constraint violation
| От | Laurence Dawson | 
|---|---|
| Тема | BUG #2393: update fails with unique constraint violation | 
| Дата | |
| Msg-id | 200604132214.k3DMEMk5054415@wwwmaster.postgresql.org обсуждение исходный текст | 
| Ответы | Re: BUG #2393: update fails with unique constraint violation Re: BUG #2393: update fails with unique constraint violation | 
| Список | pgsql-bugs | 
The following bug has been logged online:
Bug reference:      2393
Logged by:          Laurence Dawson
Email address:      larry.dawson@vanderbilt.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=>
		
	В списке pgsql-bugs по дате отправления: