Re: Deferrable NOT NULL constraints in 9.3?

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: andreak@officenet.no, pgsql-hackers@postgresql.org
Date: 2012-11-08T18:51:50Z
Lists: pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Thu, Nov 8, 2012 at 4:45 AM,  <andreak@officenet.no> wrote:
>> Are there any plans to include DEFERRABLE NOT NULL constraints in 9.3 so one
>> can do this?
>> 
>> create table test(a varchar not null deferrable initially deferred);
>> 
>> This works in Oracle and is quite handy when working with ORMs.

> Not to my knowledge ... although I can't claim to know everything that
> anyone is working on.

You could get the effect by applying the not-null check in a custom
constraint trigger.  A bit tedious but it'd work.

			regards, tom lane