Re: Constraint documentation - Mailing list pgsql-hackers

From Vik Fearing
Subject Re: Constraint documentation
Date
Msg-id 5d8bbefa-77a4-6f01-1123-5054fdbdc953@2ndquadrant.com
Whole thread Raw
In response to Re: Constraint documentation  (Lætitia Avrot <laetitia.avrot@gmail.com>)
Responses Re: Constraint documentation
List pgsql-hackers
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

"with functions" or "with a function".  I prefer the former.

> +     use <xref linkend="triggers"/> instead. Although PostgreSQL won't prevent you
> +     from doing so, but beware that dumps generated by <application>pg_dump</application>

No but.

> +     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>

-- 
Vik Fearing                                          +33 6 46 75 15 36
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support


pgsql-hackers by date:

Previous
From: "Andrey V. Lepikhov"
Date:
Subject: Re: [WIP] [B-Tree] Retail IndexTuple deletion
Next
From: Don Seiler
Date:
Subject: Re: [PATCH] Include application_name in "connection authorized" log message