Search Postgresql Archives

Re: DEFERRABLE NOT NULL constraint

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Gavan Schneider wrote:
> But I feel I have missed something here.
> 
> Referring to:
> <http://www.postgresql.org/docs/current/static/sql-createtable.html>

> CHECK constraints, NOT NULL constraints and FOREIGN KEY
> constraints all look very deferrable in this definition. If
> that's the case, why are we having this discussion if the
> requested functionality/compliance is already present? (As I
> have said already) I really must have missed something so am
> standing by for the 'gotcha'... please supply :)

Further down on the page you quote, it says:

  DEFERRABLE
  NOT DEFERRABLE

  This controls whether the constraint can be deferred.
  A constraint that is not deferrable will be checked
  immediately after every command. Checking of constraints
  that are deferrable can be postponed until the end of
  the transaction (using the SET CONSTRAINTS command).
  NOT DEFERRABLE is the default. Currently, only UNIQUE,
  PRIMARY KEY, EXCLUDE, and REFERENCES (foreign key)
  constraints accept this clause.
  NOT NULL and CHECK constraints are not deferrable.

Yours,
Laurenz Albe

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux