X-Original-To: pgsql-sql@postgresql.org Received: from jester.inquent.com (CPE00508b028d7d-CM00803785c5e0.cpe.net.cable.rogers.com [24.103.51.175]) by postgresql.org (Postfix) with ESMTP id E87A7474E42 for ; Sat, 8 Mar 2003 16:55:57 -0500 (EST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by jester.inquent.com (8.12.6/8.12.6) with ESMTP id h28LuBgv062756; Sat, 8 Mar 2003 16:56:13 -0500 (EST) (envelope-from rbt@rbt.ca) Subject: Re: Atomicity of UPDATE, interchanging values in unique From: Rod Taylor To: daniel alvarez Cc: pgsql-sql@postgresql.org In-Reply-To: <21780.1047160126@www48.gmx.net> References: <1047159202.28251.196.camel@jester> <21780.1047160126@www48.gmx.net> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-CDGK5ZDmmAgloZZQvzhY" Organization: Message-Id: <1047160571.28251.202.camel@jester> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 08 Mar 2003 16:56:11 -0500 X-Archive-Number: 200303/214 X-Sequence-Number: 12254 --=-CDGK5ZDmmAgloZZQvzhY Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Sat, 2003-03-08 at 16:48, daniel alvarez wrote: > > The first is what you want. PostgreSQL needs some work in the > > evaluation of unique indexes to properly support it. > >=20 > > Namely, when it sees a conflict when inserting into the index, it needs > > to record the fact, and revisit the conflict at the end of the command.= =20 > > Lots of work... >=20 > OK. The long-term goal would then be to get rid of such oddities. But what > can I do right now as a user to solve that issue for my application? Certainly.. But you have to find someone willing to do a the work for little gain. There are lots of issues more important to most of the developers. > There must be a better solution than the additional dummy update. You could try hiding it behind a function, but I'm afraid thats the only sane way to do it. Select into temp table, delete both, and insert values back in again is another :) --=20 Rod Taylor PGP Key: http://www.rbt.ca/rbtpub.asc --=-CDGK5ZDmmAgloZZQvzhY Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQA+amb76DETLow6vwwRAmtUAJ9cIunnMSy5Zd5FJgzWFA0bJmGfAACeNcO/ rVvFn1VuQjICRf0LMsBn4VE= =XWXc -----END PGP SIGNATURE----- --=-CDGK5ZDmmAgloZZQvzhY--