Re: Deferred uniqueness versus foreign keys

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: Dean Rasheed <dean(dot)a(dot)rasheed(at)googlemail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Deferred uniqueness versus foreign keys
Date: 2009-07-28 21:40:20
Message-ID: 8747.1248817220@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jeff Davis <pgsql(at)j-davis(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-07-28 23:00:51 Re: WIP: Deferrable unique constraints
Previous Message Jeff Davis 2009-07-28 21:16:28 Re: Deferred uniqueness versus foreign keys