Re: [HACKERS] CONSTRAINTS...

Поиск
Список
Период
Сортировка
От Hal Snyder
Тема Re: [HACKERS] CONSTRAINTS...
Дата
Msg-id 87zp7pghr1.fsf@hippo.roxor.org
обсуждение исходный текст
Ответ на CONSTRAINTS...  ("Jackson, DeJuan" <djackson@cpsgroup.com>)
Список pgsql-hackers
"Jackson, DeJuan" <djackson@cpsgroup.com> writes:

> So, could someone send me the SQL92 constraints syntax as well as the
> definition of what a deferrable constraint is supposed to be?

Maybe someone emailed you a good answer already...

There's a whole chapter on constraints in "A Guide to the SQL
Standard" 4th ed. by Date and Darwen. Constraint syntax includes
CREATE DOMAIN, ALTER DOMAIN, DROP DOMAIN, CREATE ASSERTION, DROP
ASSERTION, CREATE TABLE, ALTER TABLE, FOREIGN KEY, CHECK, and SET
CONSTRAINTS, and others.

A deferrable constraint is one that may be deferred,using INITIALLY
DEFERRED or DEFERRABLE in its definition, or later, using SET
CONSTRAINTS ... DEFERRED.

A constraint is presumably deferred until a) the end of the applicable
transaction, or b) the next COMMIT, or c) the next SET CONSTRAINTS
... IMMEDIATE, whichever comes first. A possible use of deferrable
constraints is to avoid Catch-22 when setting up tables which have
cyclic dependency among foreign keys. [SQL lawyers, check me on this.]

BTW, AltaVista Web search on "sql92 ~ constraint" yielded 8 hits -
7 of which were PostgreSQL items.




В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Thomas G. Lockhart"
Дата:
Сообщение: Re: [HACKERS] JOIN syntax. Examples?
Следующее
От: Vadim Mikheev
Дата:
Сообщение: Re: WG: [HACKERS] MVCC works in serialized mode!