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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: ALTER TABLE ... ADD FOREIGN KEY ... NOT ENFORCED
Date: 2010-12-12 22:57:17
Message-ID: 11526.1292194637@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Simon Riggs <simon(at)2ndQuadrant(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2010-12-12 23:08:43 Re: ALTER TABLE ... ADD FOREIGN KEY ... NOT ENFORCED
Previous Message Simon Riggs 2010-12-12 22:51:20 ALTER TABLE ... ADD FOREIGN KEY ... NOT ENFORCED