Samuel Hwang <samuel(at)replicon(dot)com> writes:
> Thanks. But I am not looking for how to avoid the problem at this
> moment,
> I am more interested in why PostgreSQL is designed to work this way.
Performance --- it's significantly more expensive to do a deferred
uniqueness check, since you have to visit the index a second time.
Also backwards compatibility with older versions of PG, which did
not have support for deferred uniqueness checks at all.
regards, tom lane