Re: ALTER TABLE ... ADD FOREIGN KEY ... NOT ENFORCED

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Simon Riggs <simon@2ndQuadrant.com>
Cc: pgsql-hackers@postgresql.org
Date: 2010-12-12T22:57:17Z
Lists: pgsql-hackers
Simon Riggs <simon@2ndQuadrant.com> writes:
> The new SQL Standard (SQL:2011) contains this:
> "Table constraints are either enforced or not enforced. Domain
> constraints and assertions are always enforced.", 4.17.2

> The SQL Standard allows you to turn the checking on and off for CHECK
> constraints, UNIQUE constraints and FOREIGN KEYS.

Huh?  It allows you to postpone the check until commit.  That's far from
not enforcing it.

			regards, tom lane