Re: Atomicity of UPDATE, interchanging values in unique

Поиск
Список
Период
Сортировка
От Rod Taylor
Тема Re: Atomicity of UPDATE, interchanging values in unique
Дата
Msg-id 1047160571.28251.202.camel@jester
обсуждение исходный текст
Ответ на Re: Atomicity of UPDATE, interchanging values in unique column  (daniel alvarez <d-alvarez@gmx.de>)
Ответы Re: Atomicity of UPDATE, interchanging values in unique  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
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

В списке pgsql-sql по дате отправления:

Предыдущее
От: daniel alvarez
Дата:
Сообщение: Re: Atomicity of UPDATE, interchanging values in unique column
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Atomicity of UPDATE, interchanging values in unique