Re: information_schema.check_constraints Inconsistencies - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: information_schema.check_constraints Inconsistencies
Date
Msg-id CAKFQuwZM3a4YhtEx7TJxM4wxrvCRcLq1b_MpjvuHHGgmoePwPQ@mail.gmail.com
Whole thread Raw
In response to information_schema.check_constraints Inconsistencies  (Hristo Ivanov <hristo.atanassov@gmail.com>)
List pgsql-bugs
On Tue, Sep 18, 2018 at 11:16 AM, Hristo Ivanov <hristo.atanassov@gmail.com> wrote:
Hello,

I am writing with regards to some wrong results I keep on receiving when using check_constraints view from information_schema:

(1) First, it shows constraints grouped by name, regardless of the relation used: when having two constraints with the same name in different tables, it shows both in both tables, regardless of their belonging;

Per the note here:


You cannot use the standard information_schema.check_constraints in your database because you have not conformed to the standard when naming your constraints.  Either ensure unique names for all constraints (in a schema) or use pg_catalog.
 
(2) Second, it also lists NOT NULL constraints, even though they are not created as check constraints.

That is has special syntax for its creation doesn't mean it isn't functionally a check constraint...so on its face this seems OK.

David J.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #15388: time convert error when use AT TIME ZONE '+8'
Next
From: Andrew Gierth
Date:
Subject: Re: information_schema.check_constraints Inconsistencies