Re: Deferred NOT NULL?

From: "Gregory Wood" <gregw(at)com-stock(dot)com>
To: "PostgreSQL-General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Deferred NOT NULL?
Date: 2001-02-21 16:32:09
Message-ID: 012001c09c23$d6ab41b0$7889ffcc@comstock.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hmmmm, I just found a clearer grammar description in the docs and it appears
that only REFERENCES constraints are deferrable in PostgreSQL. I suppose
I'll have to handle this via a trigger for now.

The book mentions that SQL92 allows for deferrable NOT NULL constraints. Is
this planned for anytime soon?

Gerg

> I'd like to create a new table with a NOT NULL constraint that is deferred
> until the transaction commit. Unfortunately with this definition:
>
> CREATE TABLE foo (bar INTEGER NOT NULL INITIALLY DEFERRED);
>
> I get this error:
>
> ERROR: Misplaced INITIALLY DEFERRED clause
>
> Is it possible to do this or do I have to define it as a CHECK constraint
> and defer that?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2001-02-21 16:36:52 Re: C function woes
Previous Message And. Andruikhanov 2001-02-21 16:27:01 ELOG_TIMESTAMPS feature