This is a discussion on Re: BUG #2393: update fails with unique constraint violation within the pgsql Bugs forums, part of the PostgreSQL category; --> You may want to suggest to the devs to extend the "UPDATE" syntax with "ORDER BY"? such that: update ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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. ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq |
| Thread Tools | |
| Display Modes | |
|
|