Re: information_schema.check_constraints Inconsistencies
От | David G. Johnston |
---|---|
Тема | Re: information_schema.check_constraints Inconsistencies |
Дата | |
Msg-id | CAKFQuwZM3a4YhtEx7TJxM4wxrvCRcLq1b_MpjvuHHGgmoePwPQ@mail.gmail.com обсуждение исходный текст |
Ответ на | information_schema.check_constraints Inconsistencies (Hristo Ivanov <hristo.atanassov@gmail.com>) |
Список | pgsql-bugs |
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 по дате отправления: