35.9. check_constraints
#
Представление check_constraints
показывает все ограничения-проверки, либо определённые для таблицы или домена, либо принадлежащие текущей активной роли. (Владелец таблицы или домена является владельцем ограничения.)
В стандарте SQL ограничения NOT NULL рассматриваются как проверочные ограничения с выражением CHECK (
. Поэтому ограничения NOT NULL также включены в это представление, а не в отдельное.имя_столбца
IS NOT NULL)
Таблица 35.7. Столбцы check_constraints
Тип столбца Описание |
---|
Имя базы данных, содержащей ограничение (всегда текущая база) |
Имя схемы, содержащей ограничение |
Имя ограничения |
Выражение проверки для ограничения |
35.9. check_constraints
#
The view check_constraints
contains all check constraints, either defined on a table or on a domain, that are owned by a currently enabled role. (The owner of the table or domain is the owner of the constraint.)
The SQL standard considers not-null constraints to be check constraints with a CHECK (
expression. So not-null constraints are also included here and don't have a separate view. column_name
IS NOT NULL)
Table 35.7. check_constraints
Columns
Column Type Description |
---|
Name of the database containing the constraint (always the current database) |
Name of the schema containing the constraint |
Name of the constraint |
The check expression of the check constraint |