Re: Constraint documentation

From: Patrick Francelle <patrick(at)francelle(dot)name>
To: Pantelis Theodosiou <ypercube(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Lætitia Avrot <laetitia(dot)avrot(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, bpd0018(at)gmail(dot)com, vik(dot)fearing(at)2ndquadrant(dot)com, coelho(at)cri(dot)ensmp(dot)fr, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Constraint documentation
Date: 2018-10-30 15:50:13
Message-ID: 0f600b95-160b-5578-8572-5e49b0fb70a1@francelle.name
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 08/10/18 07:02, Pantelis Theodosiou wrote:
>
> I like this:
>
>> "Postgres does not currently support CHECK constraints containing
> queries, therefore we recommend to avoid them."
>
> Perhaps adding:
>
>> CHECK constraints are currently meant to be used as *row constraints*
> only.
>> Use - if possible - UNIQUE or EXCLUDE constraints. for constraints
> that involve many or all rows of a table,
>> and FOREIGN KEY constraints for cross table constraints.
>> More complex constraints will be available when ASSERTION are implemented.
>
> And then adding some warning about using functions in CHECK constraints
> to bypass current limitations.
>
> Pantelis Theodsoiou

Hi,

I have rewritten the patch to include your remarks.
In fact, the whole patch is now based on it, so thank you.

Patrick Francelle

Attachment Content-Type Size
check_constraint_accross_table_note_v4.patch text/x-patch 874 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Axel Rau 2018-10-30 15:51:00 Re: Getting fancy errors when accessing information_schema on 10.5
Previous Message Adam Brusselback 2018-10-30 15:49:01 Re: Sequential UUID Generation