PostgreSQL

Скачать в pdf «PostgreSQL»


DIATE} ] [ [ NOT ] DEFERRABLE ]


A CONSTRAINT definition may contain one deferment attribute clause and/or one initial constraint mode clause, in any order.


NOT DEFERRABLE The constraint must be cheeked at the end of each statement. SET CONSTRAINTS ALL DEFERRED will have no effect on this type of constraint.


DEFERRABLE This controls whether the constraint can be deferred to the end of the transaction. If SET CONSTRAINTS ALL DEFERRED is used or the constraint is set to INITIALLY DEFERRED, this will cause the foreign key to be checked only at the end of the transaction.


SET CONSTRAINT changes the foreign key constraint mode only for the current transaction.


INITIALLY IMMEDIATE Check constraint only at the end of the transaction. This is the default


INITIALLY DEFERRED Check constraint after each statement.


CHECK clause


SQL92 specifies some additional capabilities for CHECK in either table or column constraints. table constraint definition:


[ CONSTRAINT name ] CHECK ( VALUE condition ) [ { INITIALLY DEFERRED | INITIALLY immediate} ] [ [ NOT ] DEFERRABLE ]


column constraint definition:


[ CONSTRAINT name ] CHECK ( VALUE condition ) [ { INITIALLY DEFERRED | INITIALLY IMMEDIATE} ] [ [ NOT ] DEFERRABLE ]


PRIMARY KEY clause


SQL92 specifies some additional capabilities for PRIMARY KEY:


Table Constraint definition:


[ CONSTRAINT name ] PRIMARY KEY ( column [, …] ) [ { INITIALLY DEFERRED | INITIALLY IMMEDIATE} ] [ [ NOT ] DEFERRABLE ]

Скачать в pdf «PostgreSQL»