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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-bugs by date

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