pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rod Taylor <rbt@rbt.ca>
To: daniel alvarez <d-alvarez@gmx.de>
Cc: pgsql-sql@postgresql.org
Subject: Re: Atomicity of UPDATE, interchanging values in unique
Date: 08 Mar 2003 16:56:11 -0500
Message-ID: <1047160571.28251.202.camel@jester> (raw)
In-Reply-To: <21780.1047160126@www48.gmx.net>
References: <1047159202.28251.196.camel@jester>
	<21780.1047160126@www48.gmx.net>

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.
> > 
> > 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. 
> > Lots of work...
> 
> 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 :)

-- 
Rod Taylor <rbt@rbt.ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

Attachments:

  signature.asc (application/pgp-signature, 186B) download

view thread (6+ messages)  latest in thread

Message-ID: <1047160571.28251.202.camel@jester>
Permalink:  ../1047160571.28251.202.camel@jester/
Also on:    postgresql.org/message-id/1047160571.28251.202.camel@jester

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: rbt@rbt.ca, d-alvarez@gmx.de
  Subject: Re: Atomicity of UPDATE, interchanging values in unique
  In-Reply-To: <1047160571.28251.202.camel@jester>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox