Skip site navigation (1) Skip section navigation (2)

Re: BUG #5477: CREATE DOMAIN NOT NULL constraints not always enforced for INSERT with subquery

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Matthew Nourse <matthew(at)nplus1(dot)com(dot)au>
Cc: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5477: CREATE DOMAIN NOT NULL constraints not always enforced for INSERT with subquery
Date: 2010-05-30 17:54:14
Message-ID: 1964.1275242054@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Matthew Nourse <matthew(at)nplus1(dot)com(dot)au> writes:
> As NOT NULL on domains doesn't always prevent a value from becoming NULL 
> (and because it "sucks" :) ) would you consider deprecating the 
> not-null-on-domains feature and then removing it from some future 
> version of PostgreSQL?

We can't really because it's required by SQL standard.  Perhaps at some
point the standards committee will think it through a little better and
publish something that resolves the contradictions.  For the moment the
bottom line is that it's got debatable behavior and is best avoided.

			regards, tom lane

In response to

Responses

pgsql-bugs by date

Next:From: Matthew NourseDate: 2010-05-30 23:07:53
Subject: Re: BUG #5477: CREATE DOMAIN NOT NULL constraints not always enforced for INSERT with subquery
Previous:From: Tom LaneDate: 2010-05-30 17:43:57
Subject: Re: BUG #5484: sum() bug

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group