Re: BUG #2948: default null values for not-null domains - Mailing list pgsql-bugs

From Sergiy Vyshnevetskiy
Subject Re: BUG #2948: default null values for not-null domains
Date
Msg-id Pine.LNX.4.64.0702011650090.22446@uanet.vostok.net
Whole thread Raw
In response to Re: BUG #2948: default null values for not-null domains  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-bugs
On Thu, 1 Feb 2007, Peter Eisentraut wrote:

> Tom Lane wrote:
>> I'm starting to get the feeling that the entire idea of NOT NULL
>> domains is broken :-(
>
> How is that so very different from having a default value of 5 with a
> domain that rejects 5?

Because 5 will be rejected as a value for a variable or field of such
domain. This is correct (and useful) behavior.

On the other hand null can make it there under some circumstances, even if
domain explicitly forbids nulls. Which is the bug I'm fighting against.

Actually there are several of them, and I plan to post them all. And,
hopefully, bugfixes too.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #2948: default null values for not-null domains
Next
From: "Sergiy Vyshnevetskiy"
Date:
Subject: BUG #2954: null is not checked against domain constraints in return clause