Re: types of constraint deferment

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: types of constraint deferment
Дата
Msg-id 20030812114012.G17277-100000@megazone.bigpanda.com
обсуждение исходный текст
Ответ на Re: types of constraint deferment  (Ron Johnson <ron.l.johnson@cox.net>)
Ответы Re: types of constraint deferment  (Dennis Gearon <gearond@cvc.net>)
Список pgsql-general
On 12 Aug 2003, Ron Johnson wrote:

> On Tue, 2003-08-12 at 00:38, Stephan Szabo wrote:
> > On 11 Aug 2003, Ron Johnson wrote:
> >
> > > v7.3.3
> > > http://www.postgresql.org/docs/7.3/static/sql-createtable.html
> > >
> > > Is "INITIALLY DEFERRED" a modifier of "NOT DEFERRABLE"?  If so,
> > > what does it do, since they seem contradictory.
> >
> > It's not allowed.  An INITIALLY DEFERRED constraint must not
> > be defined as NOT DEFERRABLE, although an INITIALLY DEFERRED
> > constraint that doesn't specify either is considered DEFERRABLE.
> > The docs refered to are weak on this, care to try a rewrite of
> > those parts? :)
>
> Sure, after I know what the rules are!!!!!

Basically, you can specify one of the following states on the constraint
(unless I'm missing something)

Neither a check time nor a deferrability, in which case you get
 NOT DEFERRABLE INITIALLY IMMEDIATE
No check time and NOT DEFERRABLE, in which case you get
 NOT DEFERRABLE INITIALLY IMMEDIATE
No check time and DEFERRABLE, in which case you get
 DEFERRABLE INITIALLY IMMEDIATE
A check time of INITIALLY IMMEDIATE and no deferrability, in which case
 you get NOT DEFERRABLE INITIALLY IMMEDIATE
A check time of INITIALLY DEFERRED and no deferrability, in which case
 you get DEFERRABLE INITIALLY DEFERRED
A check time of INITIALLY IMMEDIATE and NOT DEFERRABLE, in which case
 you get NOT DEFERRABLE INITIALLY IMMEDIATE
A check time of INITIALLY IMMEDIATE and DEFERRABLE, in which case
 you get DEFERRABLE INITIALLY IMMEDIATE
A check time of INITIALLY DEFERRED and DEFERRABLE, in which case
 you get DEFERRABLE INITIALLY DEFERRED
A check time of INITIALLY DEFERRED and NOT DEFERRABLE is an error
 condition.



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: PL/C functions
Следующее
От: Dennis Gearon
Дата:
Сообщение: Re: PL/C functions