Re: FOREIGN KEY: difference between NOT DEFERRABLE and

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Gabriel Fernandez <gabi(at)unica(dot)edu>
Cc: PostgreSQL-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: FOREIGN KEY: difference between NOT DEFERRABLE and
Date: 2001-09-04 17:49:08
Message-ID: Pine.BSF.4.21.0109041047001.82280-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 4 Sep 2001, Gabriel Fernandez wrote:

> Hi,
>
> What's the difference between NOT DEFERRABLE and INITIALLY IMMEDIATE for
> a FOREIGN KEY specification ?
>
> It seems they are both defining the same: the moment the constraint will
> be checked: the instant the statement is processed or the end of
> transaction.

Well, at start. With initially immediate you can use SET CONSTRAINTS to
change it on the fly back and forth from deferrable to not. NOT
DEFERRABLE means you cannot do so.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Francesco Casadei 2001-09-04 17:57:50 Re: Catching errors inside a function
Previous Message Bruce Momjian 2001-09-04 17:39:36 Re: pg7.1 release date