Re: CHECK constraints - order of evaluation

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: llucenic(at)gmail(dot)com, pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: CHECK constraints - order of evaluation
Date: 2020-05-14 14:40:12
Message-ID: CAKFQuwaTibH4T5rv9WzMVwQH2ic5q9g1FdAdAXN8=es+gKu=uQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Thu, May 14, 2020 at 2:30 AM PG Doc comments form <noreply(at)postgresql(dot)org>
wrote:

> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/9.6/ddl-constraints.html
> Description:
>
> I think the information about the "order of execution" when checking CHECK
> constraints when inserting or updating records is missing in the
> documentation.

Check constraints require immutable functions and do not have side
effects. The order of their execution is immaterial and thus not
documented. The server is free to do whatever it wishes whenever it wishes
and users should not depend on any specific observed order in their usage
(I don't believe we actually say to avoid depending upon undocumented
behavior but that is the general guideline or working with systems).

David J.

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Marina Polyakova 2020-05-14 15:30:38 Re: Missing comma?
Previous Message PG Doc comments form 2020-05-14 09:06:34 CHECK constraints - order of evaluation