Re: Deferred NOT NULL? - Mailing list pgsql-general

From Gregory Wood
Subject Re: Deferred NOT NULL?
Date
Msg-id 012001c09c23$d6ab41b0$7889ffcc@comstock.com
Whole thread Raw
In response to Deferred NOT NULL?  ("Gregory Wood" <gregw@com-stock.com>)
Responses Re: Re: Deferred NOT NULL?
List 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?



pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: C function woes
Next
From: Peter Eisentraut
Date:
Subject: Re: pg_shadow.passwd versus pg_hba.conf password passwd