|
|||||||||||
|
Re: [GENERAL] Re: Why the ERROR: duplicate key violates unique constraint "master_pkey" is raised? - Is this a Bug?
From: Alban Hertroys <a.hertroys(at)magproductions.nl>
Date: Fri Sep 28 2007 - 04:30:41 EDT
Would something like
UPDATE master set m2 = master2.m2
SELECT m2 +1 FROM master m WHERE m.master_id = master.master_id ORDER BY m2 DESC ) master2 work? I think it might be faster (and possibly cause less index bloat) than doing two consequent updates. Haven't tested this though... -- Alban Hertroys alban@magproductions.nl magproductions b.v. T: ++31(0)534346874 F: ++31(0)534346876 M: I: www.magproductions.nl A: Postbus 416 7500 AK Enschede // Integrate Your World // ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmasterReceived on Fri Sep 28 04:35:29 2007 This archive was generated by hypermail 2.1.8 : Sun Oct 07 2007 - 11:56:11 EDT |
||||||||||
|
|||||||||||