On Thu, 16 May 2002, Josh Berkus wrote:
>
> Stephan,
> > > I don't seem to be able to create a UNIQUE constraint as DEFERRABLE. Is
> this
> > > not supported?
> >
> > Not currently.
>
> Hmm ... my workaround didn't work. I need to impose a unique constraint on
> an INT column in a table, but make sure that the constraint isn't checked
> until the end of an UPDATE statement, so that I can swap values when I need
> to.
>
> How can I do this?
I unfortunately can't think of a good workaround. AFAICT, Unique should
wait until after all of the updates but our implementation doesn't
currently do so.
Hopefully someone will have some ideas, because the best I can think of
requires an additional full table scan to check uniqueness and the
concurrency issues would be a bear.