Re: Constraint documentation
Patrick Francelle <patrick@francelle.name>
From: Patrick Francelle <patrick@francelle.name>
To: Pantelis Theodosiou <ypercube@gmail.com>,
Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Lætitia Avrot <laetitia.avrot@gmail.com>, Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, bpd0018@gmail.com, vik.fearing@2ndquadrant.com, coelho@cri.ensmp.fr, pgsql-hackers@lists.postgresql.org
Date: 2018-10-30T15:50:13Z
Lists: pgsql-hackers
Attachments
- check_constraint_accross_table_note_v4.patch (text/x-patch) patch v4
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
Commits
-
Clarify that cross-row constraints are unsupported
- 36d442a25a1a 12.0 landed