Re: ERROR: check constraint - PostgreSQL 9.2

From: Christophe Pettus <xof(at)thebuild(dot)com>
To: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: ERROR: check constraint - PostgreSQL 9.2
Date: 2016-01-25 04:19:07
Message-ID: E13239AF-DB2F-4656-93C6-DE352C4367D6@thebuild.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Jan 24, 2016, at 8:17 PM, Christophe Pettus <xof(at)thebuild(dot)com> wrote:
> 2. Use the NOT VALID option on ALTER TABLE ... ADD constraint, which allows the addition of a constraint without actually checking its validity.

And note that you might miss some potential planner optimizations this way, as the planner will not assume the constraint holds true unless you remove the NOT VALID condition from it with VALIDATE CONSTRAINT.

--
-- Christophe Pettus
xof(at)thebuild(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Regina Obe 2016-01-25 05:00:13 Re: A motion
Previous Message Christophe Pettus 2016-01-25 04:17:36 Re: ERROR: check constraint - PostgreSQL 9.2