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

From Tom Lane
Subject Re: BUG #2948: default null values for not-null domains
Date
Msg-id 19774.1170351315@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #2948: default null values for not-null domains  (Sergiy Vyshnevetskiy <serg@vostok.net>)
Responses Re: BUG #2948: default null values for not-null domains  (Sergiy Vyshnevetskiy <serg@vostok.net>)
List pgsql-bugs
Sergiy Vyshnevetskiy <serg@vostok.net> writes:
> Why not add PLPGSQL_TTYPE_DOMAIN and rename PLPGSQL_TTYPE_SCALAR to
> PLPGSQL_TTYPE_BASE? We only use PLPGSQL_TTYPE_SCALAR in _3_ places!

That was my first thought too, but it's wrong.  The right thing is to
look at the strictness of the input function, because that is the API
we have defined to determine whether a datatype might possibly be
interested in rejecting nulls.  The fact that domain_in() is the only
example in the core system doesn't make it correct to restrict the
functionality to domains.

            regards, tom lane

pgsql-bugs by date:

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