Re: BUG #2393: update fails with unique constraint violation

From: "Vlad ROMASCANU" <vlad(dot)romascanu(at)ericsson(dot)com>
To: <larry(dot)dawson(at)vanderbilt(dot)edu>
Cc: <pgsql-bugs(at)postgresql(dot)org>, <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <tgl(at)pgh(dot)pa(dot)us>
Subject: Re: BUG #2393: update fails with unique constraint violation
Date: 2007-08-03 16:02:34
Message-ID: 00b601c7d5e7$baed1610$395930a4@eemea.ericsson.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Koczan 2007-08-03 21:40:07 Re: BUG #3504: Some listening sessions never return from writing, problems ensue
Previous Message Rodriguez Fernando 2007-08-03 14:56:43 Re: Bug Pgsql