Re: DEFERRABLE and DEFERRED

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: DEFERRABLE and DEFERRED
Дата
Msg-id 20020605070358.R13828-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на DEFERRABLE and DEFERRED  (Adrian 'Dagurashibanipal' von Bidder <avbidder@fortytwo.ch>)
Список pgsql-general
On 5 Jun 2002, Adrian 'Dagurashibanipal' von Bidder wrote:

> It seems not possible to defer anything other than FOREIGN KEY
> constraints. Is this true, and are there reasons for this?

Yes and because noone's done it yet. :)
Seriously, it's generally less important for not null, unique and primary
key.  I'd expect check constraints to get it first.

> What we want to do fill a record step by step, leaving some NOT NULL
> columns empty in the first place and later in the transaction UPDATEing
> them to contain some values. Collecting the values first would be
> impractical as the update statements are somewhat scattered over various
> modules of the program.

You could probably write trigger functions that you could use with
create constraint trigger that would let you defer the check.  You'd have
to make sure that the row you were given is still valid (do nothing if
it is not).


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

Предыдущее
От: "Joshua b. Jore"
Дата:
Сообщение: Insight into indexes? (or inverting then externally)
Следующее
От: Joseph Maxwell
Дата:
Сообщение: Re: How do I get a Digest subscription?