| From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
|---|---|
| To: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
| Cc: | Eugene Losowski-Gallagher <eugene(dot)losowskigallagher(at)googlemail(dot)com>, "pgsql-docs(at)lists(dot)postgresql(dot)org" <pgsql-docs(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Constraint check is missing value check ARRAY |
| Date: | 2026-09-14 21:59:35 |
| Message-ID: | CAKFQuwbZQ52za0hYXk70f_G7HHqXTQ4NCW_yDODOViLaAV8TLQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-docs |
On Monday, September 14, 2026, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
wrote:
>
> > That URL above includes all the other value constraints (against
> comparator const, against comparator variable, unique and foreign key), but
> nothing for a fixed limited set of equals values.
> >
> > In the above example I provided it is needed as not all letters are
> valid.
> > Another example would be "displayed = Y, N"
> >
> > Postgres is a little more finicky than oracle, but the feature exists,
> and works nicely, just with awkward syntax.
> > All I am asking is the documentation to include it.
>
> There is no special "check array constraint", so there is no point in
> documenting it.
>
I concur. That section assumes one knows how to write a “boolean
(truth-value) expression” or can go find that out by reading the relevant
sections on writing expressions - which are used everywhere in the system.
Places that simply allow for expressions to be present need not cover the
topic in detail.
The documentation isn’t a book of examples or idea generators. Examples
are used to make a point as to the correct usage of a feature but make no
attempt to be a comprehensive idea generator for how a feature could be
used.
It also doesn’t really try to deal with the fact that some readers may come
along with preconceptions that mislead them. Using an array there is also
not particularly idiomatic in any case. The status quo seems warranted -
the comparator classification quoted above is an interesting one but not
something this documentation has framed up; both of those are simply
boolean expressions which is how the docs framed it.
David J.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David G. Johnston | 2026-09-15 12:29:28 | Re: Anonymous record member access |
| Previous Message | PG Doc comments form | 2026-09-14 18:39:09 | Anonymous record member access |