Re: thoughts about constraint trigger

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: thoughts about constraint trigger
Дата
Msg-id 4C1717C5.7000500@postnewspapers.com.au
обсуждение исходный текст
Ответ на thoughts about constraint trigger  (Adrian von Bidder <avbidder@fortytwo.ch>)
Ответы Re: thoughts about constraint trigger  (Adrian von Bidder <avbidder@fortytwo.ch>)
Список pgsql-general
On 15/06/10 02:33, Adrian von Bidder wrote:
> Heyho!
>
> I was trying to implement a deferred NOT NULL constraint using a deferred
> constraint trigger (on update and insert of this row) because some values
> would be filled in later during the transaction, after the initial part of
> the record has been filled.

AFAIK, at this point only FOREIGN KEY constraints may be deferred.

http://www.postgresql.org/docs/current/static/sql-set-constraints.html
http://www.postgresql.org/docs/current/static/sql-createtable.html

"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. Only foreign key constraints currently accept
this clause. All other constraint types are not deferrable."

--
Craig Ringer

Tech-related writing: http://soapyfrogs.blogspot.com/

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

Предыдущее
От: Joshua Tolley
Дата:
Сообщение: Re: Enforcing password standards
Следующее
От: "M. Bashir Al-Noimi"
Дата:
Сообщение: Re: Does enterprisedb.com down?