Re: Constraint documentation

From: Vik Fearing <vik(dot)fearing(at)2ndquadrant(dot)com>
To: Lætitia Avrot <laetitia(dot)avrot(at)gmail(dot)com>, coelho(at)cri(dot)ensmp(dot)fr
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Constraint documentation
Date: 2018-06-25 19:25:43
Message-ID: 5d8bbefa-77a4-6f01-1123-5054fdbdc953@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Don Seiler 2018-06-25 19:57:08 Re: [PATCH] Include application_name in "connection authorized" log message
Previous Message Andrey V. Lepikhov 2018-06-25 18:20:26 Re: [WIP] [B-Tree] Retail IndexTuple deletion