Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitaf2324f

Browse files
committed
doc: Clarify not-null constraints in information schema
Add a bit of clarification in various places that not-null constraintsare included under check constraints in the information schema.
1 parent3338a98 commitaf2324f

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

‎doc/src/sgml/information_schema.sgml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -917,6 +917,13 @@
917917
domain is the owner of the constraint.)
918918
</para>
919919

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+
920927
<table>
921928
<title><structname>check_constraints</structname> Columns</title>
922929
<tgroup cols="1">
@@ -2116,7 +2123,9 @@
21162123
columns in the current database that are used by some constraint.
21172124
Only those columns are shown that are contained in a table owned by
21182125
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
21202129
a foreign key constraint, this view identifies the columns that the
21212130
foreign key references. For a unique or primary key constraint,
21222131
this view identifies the constrained columns.
@@ -6856,7 +6865,7 @@ ORDER BY c.ordinal_position;
68566865
<structfield>constraint_type</structfield> <type>character_data</type>
68576866
</para>
68586867
<para>
6859-
Type of the constraint: <literal>CHECK</literal>,
6868+
Type of the constraint: <literal>CHECK</literal> (includes not-null constraints),
68606869
<literal>FOREIGN KEY</literal>, <literal>PRIMARY KEY</literal>,
68616870
or <literal>UNIQUE</literal>
68626871
</para></entry>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp