Re: BUG #15085: Domain "not null" constraint doesn't detect a null returned from a resultset - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #15085: Domain "not null" constraint doesn't detect a null returned from a resultset
Date
Msg-id 4593.1519744356@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #15085: Domain "not null" constraint doesn't detect a nullreturned from a resultset  (Daniel Einspanjer <deinspanjer@gmail.com>)
List pgsql-bugs
Daniel Einspanjer <deinspanjer@gmail.com> writes:
> Tom, please forgive me if this is a non-starter for a suggestion, but what
> about forcing a not null constraint on a column that is declared to be of
> the type of a domain that has a not null constraint?

I don't particularly want to go there.  What happens when you add or drop
the not null constraint on an existing domain type?

In any case, this would amount to positive reinforcement for people who
use domain not null constraints, which IMO is bad practice to start with.
Not everything in the SQL standard is a good idea.

            regards, tom lane


pgsql-bugs by date:

Previous
From: Daniel Einspanjer
Date:
Subject: Re: BUG #15085: Domain "not null" constraint doesn't detect a nullreturned from a resultset
Next
From: Michael Aiello
Date:
Subject: RE: BUG #15091: to_number() returns incorrect value