diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml index 954c3a9..07723b8 100644 --- a/doc/src/sgml/ddl.sgml +++ b/doc/src/sgml/ddl.sgml @@ -432,11 +432,14 @@ CREATE TABLE products ( A not-null constraint is always written as a column constraint. A not-null constraint is functionally equivalent to creating a check constraint CHECK (column_name - IS NOT NULL), but in + IS DISTINCT FROM NULL), but in PostgreSQL creating an explicit not-null constraint is more efficient. The drawback is that you cannot give explicit names to not-null constraints created this - way. + way. Note that according to the SQL standard, NOT NULL + is equivalent to CHECK (columnn_name + IS NOT NULL), which has different semantics for composite + types.