Re: creating CHECK constraints as NOT VALID - Mailing list pgsql-hackers

From Jaime Casanova
Subject Re: creating CHECK constraints as NOT VALID
Date
Msg-id BANLkTi=biA9BsDCtNjvoienvGHUcSFZ-HA@mail.gmail.com
Whole thread Raw
In response to Re: creating CHECK constraints as NOT VALID  (Jaime Casanova <jaime@2ndquadrant.com>)
Responses Re: creating CHECK constraints as NOT VALID
List pgsql-hackers
On Thu, Jun 16, 2011 at 4:10 AM, Jaime Casanova <jaime@2ndquadrant.com> wrote:
> On Wed, Jun 15, 2011 at 7:08 PM, Alvaro Herrera
> <alvherre@commandprompt.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


pgsql-hackers by date:

Previous
From: Brendan Jurd
Date:
Subject: Re: Fwd: Keywords in pg_hba.conf should be field-specific
Next
From: Thom Brown
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Don't use "cp -i" in the example WAL archive_command.