The difference between RESTRICT and NO ACTION

From: Bill Todd <pg(at)dbginc(dot)com>
To: PgSQL General <pgsql-general(at)postgresql(dot)org>
Subject: The difference between RESTRICT and NO ACTION
Date: 2009-01-26 22:41:19
Message-ID: 497E3C0F.5030003@dbginc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

In discussing foreign key constraints the manual makes the following
statement about the difference between RESTRICT and NO ACTION.

"(The essential difference between these two choices is that |NO ACTION|
allows the check to be deferred until later in the transaction, whereas
|RESTRICT| does not.)"

Can someone explain what this means in practical terms? Do both options
generate the same error message? Does "until later in the transaction"
mean that NO ACTION is not checked until an attempt is made to commit
the transaction?

If someone can point me to a more detailed explanation I would
appreciate it. Thanks.

Bill

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bill Todd 2009-01-27 02:06:56 Re: The difference between RESTRICT and NO ACTION
Previous Message Scott Marlowe 2009-01-26 22:18:42 Re: Please, could I subscribe to this list? Thanks.