Re: Deferred uniqueness versus foreign keys - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Deferred uniqueness versus foreign keys
Date
Msg-id 8747.1248817220@sss.pgh.pa.us
Whole thread Raw
In response to Re: Deferred uniqueness versus foreign keys  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-hackers
Jeff Davis <pgsql@j-davis.com> writes:
> Is it a problem to allow unique constraints to be deferrable until the
> end of the command though?

Yes.  If you do have a case where this matters, the command updating the
referenced table is most likely different from the one updating the
referencing table, and so the command boundaries aren't the same.

I think what we can do for now is insist that the FK's unique constraint
be immediate-mode.  Trying to relax that looks like a research project
to me.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: Deferred uniqueness versus foreign keys
Next
From: Tom Lane
Date:
Subject: Re: WIP: Deferrable unique constraints