Re: deferrable foreign keys

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Morus Walter <morus(dot)walter(dot)ml(at)googlemail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: deferrable foreign keys
Date: 2009-12-02 15:42:12
Message-ID: 13460.1259768532@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Morus Walter <morus(dot)walter(dot)ml(at)googlemail(dot)com> writes:
> are there downsides of making foreign keys deferrable (but initially
> immediate) for updates, when the transaction does not set the
> constraint behaviour to deferred?

> I'd expect that to have the same behaviour as non deferrable foreign
> keys.
> What I don't understand is, why is non deferrable the default, then.

Because the SQL standard says so. I don't believe there is any actual
penalty for deferrable within the PG implementation, but perhaps there
is in other systems' implementations.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tatsuo Ishii 2009-12-02 15:48:43 Re: Large Objects and Replication question
Previous Message Michael Gould 2009-12-02 15:39:59 Re: Roles with passwords; SET ROLE ... WITH PASSWORD ?