Re: creating CHECK constraints as NOT VALID

From: Jaime Casanova <jaime(at)2ndquadrant(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: creating CHECK constraints as NOT VALID
Date: 2011-06-18 06:57:22
Message-ID: BANLkTi=biA9BsDCtNjvoienvGHUcSFZ-HA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jun 16, 2011 at 4:10 AM, Jaime Casanova <jaime(at)2ndquadrant(dot)com> wrote:
> On Wed, Jun 15, 2011 at 7:08 PM, Alvaro Herrera
> <alvherre(at)commandprompt(dot)com> wrote:
>>
>> Yeah, nothing serious.  Updated patch attached.  The wording in the doc
>> changes could probably use some look over.
>>
>
> looks good to me... at least it compiles, and function as i would expect...
> tomorrow i will read the code more carefully and look at the docs, but
> probably this is just fine to be commited...
>

I think that this paragraph is confusing, but not being an natural
english speaker i will let others give their opinion here:
! If NOT VALID is not specified,
! the command will only succeed if all columns using the
! domain satisfy the new constraint.
! The constraint is going to be enforced on new data inserted into columns
! using the domain in all cases, regardless of <literal>NOT VALID</>.
! <literal>NOT VALID</> is only accepted for <literal>CHECK</>
constraints.

Even if it is redundant maybe here should say "This form validates a
constraint previously added as NOT VALID", otherwise someone could
think that by default constraints are not enforced and should be
validated
+ <term>VALIDATE CONSTRAINT</term>
+ <listitem>
+ <para>
+ This form validates a constraint previously added, that is, verify that
+ all data in columns using the domain satisfy the specified constraint.
+ </para>
+ </listitem>
+ </varlistentry>

otherwise the patch looks good, and works fine in every test i could imagine...

--
Jaime Casanova         www.2ndQuadrant.com
Professional PostgreSQL: Soporte 24x7 y capacitación

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thom Brown 2011-06-18 08:05:10 Re: Re: [COMMITTERS] pgsql: Don't use "cp -i" in the example WAL archive_command.
Previous Message Brendan Jurd 2011-06-18 03:53:29 Re: Fwd: Keywords in pg_hba.conf should be field-specific