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

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

From: Matthew Nourse <matthew(at)nplus1(dot)com(dot)au>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: tgl(at)sss(dot)pgh(dot)pa(dot)us, 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 09:53:52
Message-ID: 4C0235B0.90903@nplus1.com.au (view raw or flat)
Thread:
Lists: pgsql-bugs
Kevin Grittner wrote:
> Tom Lane  wrote:
>  
> < NOT NULL constraints at the domain level suck. Don't use 'em.
>  
> +1
>  
> As someone who uses domains very heavily, I can attest that the
> semantics of that are very weak.  Whether a domain is nullable
> depends almost entirely on the context of its use, which you can't
> (and shouldn't try to) anticipate on its declaration.

Fair enough, thanks Tom and Kevin for the insights and thanks Bruce for 
applying the doco patch, that makes things much clearer.

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?

Thanks again,
Matt

In response to

Responses

pgsql-bugs by date

Next:From: SergeyDate: 2010-05-30 14:48:53
Subject: BUG #5484: sum() bug
Previous:From: Robert HaasDate: 2010-05-30 03:50:23
Subject: Re: Re: BUG #5480: Autovacuum interferes with operations (e.g. truncate) on very large databases

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