|
917 | 917 | domain is the owner of the constraint.)
|
918 | 918 | </para>
|
919 | 919 |
|
| 920 | + <para> |
| 921 | + The SQL standard considers not-null constraints to be check constraints |
| 922 | + with a <literal>CHECK (<replaceable>column_name</replaceable> IS NOT |
| 923 | + NULL)</literal> expression. So not-null constraints are also included here |
| 924 | + and don't have a separate view. |
| 925 | + </para> |
| 926 | + |
920 | 927 | <table>
|
921 | 928 | <title><structname>check_constraints</structname> Columns</title>
|
922 | 929 | <tgroup cols="1">
|
|
2116 | 2123 | columns in the current database that are used by some constraint.
|
2117 | 2124 | Only those columns are shown that are contained in a table owned by
|
2118 | 2125 | a currently enabled role. For a check constraint, this view
|
2119 |
| - identifies the columns that are used in the check expression. For |
| 2126 | + identifies the columns that are used in the check expression. For a |
| 2127 | + not-null constraint, this view identifies the column that the constraint is |
| 2128 | + defined on. For |
2120 | 2129 | a foreign key constraint, this view identifies the columns that the
|
2121 | 2130 | foreign key references. For a unique or primary key constraint,
|
2122 | 2131 | this view identifies the constrained columns.
|
@@ -6856,7 +6865,7 @@ ORDER BY c.ordinal_position;
|
6856 | 6865 | <structfield>constraint_type</structfield> <type>character_data</type>
|
6857 | 6866 | </para>
|
6858 | 6867 | <para>
|
6859 |
| - Type of the constraint: <literal>CHECK</literal>, |
| 6868 | + Type of the constraint: <literal>CHECK</literal> (includes not-null constraints), |
6860 | 6869 | <literal>FOREIGN KEY</literal>, <literal>PRIMARY KEY</literal>,
|
6861 | 6870 | or <literal>UNIQUE</literal>
|
6862 | 6871 | </para></entry>
|
|
0 commit comments