Re: [BUGS] BUG #2393: update fails with unique constraint violation

2007-08-03 Thread Vlad ROMASCANU
You may want to suggest to the devs to extend the "UPDATE" syntax with "ORDER BY"? such that: update rumple.directory set right_visit_id = right_visit_id + 2 where right_visit_id >= parent_right ORDER BY right_visit_id DESC; ...would work by enforcing a certain update order. And index scan is

Re: [BUGS] BUG #2393: update fails with unique constraint violation

2007-02-09 Thread Tom Lane
Lar <[EMAIL PROTECTED]> writes: > I just wanted to see if there is any plan to develop a solution to > this Nothing is likely to happen until someone has a great idea about how to do it without a major performance hit. And you can't have great ideas on a schedule. regard

Re: [BUGS] BUG #2393: update fails with unique constraint violation

2007-02-09 Thread Lar
I just wanted to see if there is any plan to develop a solution to this - I still see that there is a todo listed on the postgresql site at http://developer.postgresql.org/cvsweb.cgi/~checkout~/pgsql/doc/src/FAQ/TODO.html ...but it hasn't been visited since September 06. There was a motivation

Re: [BUGS] BUG #2393: update fails with unique constraint violation

2006-04-15 Thread Bruce Momjian
T.J. Ferraro wrote: > Isn't that expected? Your query will try to update row 3 first and set > the primary key to 5, which in fact would violate the primary key > constraint on that table. While the error is expected, it isn't valid based on the SQL spec. The spec requires checks to happen at s

Re: [BUGS] BUG #2393: update fails with unique constraint violation

2006-04-15 Thread T.J. Ferraro
Isn't that expected? Your query will try to update row 3 first and set the primary key to 5, which in fact would violate the primary key constraint on that table. Laurence Dawson wrote: And then try an update: lstore=> select * from test.test; a 1 2 3 4 5 6 7 8 9 10 (1

Re: [BUGS] BUG #2393: update fails with unique constraint violation

2006-04-15 Thread Harald Armin Massa
Laurence,that error is correct:CREATE TABLE test.test(  a int4 NOT NULL DEFAULT nextval(' test.test_a_seq'::regclass),  CONSTRAINT pk PRIMARY KEY (a))WITHOUT OIDS;And then try an update:lstore=> select * from test.test; a  1  2  3  4  5  6  7  8   9 10lstore=> update test.test set a = a + 2 whe

[BUGS] BUG #2393: update fails with unique constraint violation

2006-04-15 Thread Laurence Dawson
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 t