Re: BUG #2393: update fails with unique constraint violation - Mailing list pgsql-bugs

From Vlad ROMASCANU
Subject Re: BUG #2393: update fails with unique constraint violation
Date
Msg-id 00b601c7d5e7$baed1610$395930a4@eemea.ericsson.se
Whole thread Raw
In response to BUG #2393: update fails with unique constraint violation  ("Laurence Dawson" <larry.dawson@vanderbilt.edu>)
List pgsql-bugs
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
performed anyway because of the 'where' clause, might as well do it in
order. :)

MySQL does it like that AFAIK.

V.

pgsql-bugs by date:

Previous
From: "William Leite Araújo"
Date:
Subject: Re: BUG #3506: to_number silently ignore characters
Next
From: Peter Koczan
Date:
Subject: Re: BUG #3504: Some listening sessions never return from writing, problems ensue