Hi,

Thanks a lot. I did the modification. It's in the patch enclosed.

Have a nice day,

Lætitia

Le mar. 26 juin 2018 à 01:42, Brad DeJong <bpd0...@gmail.com> a écrit :

> On 25/06/18 17:45, Lætitia Avrot wrote:
> > +   <note>
> > +    <para>
> > +     Check constraint are not designed to enforce business rules across
> tables.
> > +     Avoid using check constraints with function accessing other tables
> and
>
> Subject/verb agreement - either "A check constraint is ..." or "Check
> constraints are ..." would be appropriate.
>


-- 
*Think! Do you really need to print this email ? *
*There is no Planet B.*
diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml
index 50dc25f..d7cc1d9 100644
--- a/doc/src/sgml/ddl.sgml
+++ b/doc/src/sgml/ddl.sgml
@@ -403,6 +403,18 @@ CREATE TABLE products (
     ensure that a column does not contain null values, the not-null
     constraint described in the next section can be used.
    </para>
+
+   <note>
+    <para>
+     Check constraints are not designed to enforce business rules across tables.
+     Avoid using check constraints with a function accessing other tables and
+     use <xref linkend="triggers"/> instead. Although PostgreSQL won't prevent you
+     from doing so, beware that dumps generated by <application>pg_dump</application>
+     or <application>pg_dumpall</application> may be hard
+     to restore because of such checks, as the underlying dependencies are not
+     taken into account.
+    </para>
+   </note>
   </sect2>
 
   <sect2>

Reply via email to