Re: BUG #2948: default null values for not-null domains

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sergiy Vyshnevetskiy <serg(at)vostok(dot)net>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2948: default null values for not-null domains
Date: 2007-02-01 17:35:15
Message-ID: 19774.1170351315@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Sergiy Vyshnevetskiy <serg(at)vostok(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Sergiy Vyshnevetskiy 2007-02-01 18:10:02 Re: BUG #2948: default null values for not-null domains
Previous Message Sergiy Vyshnevetskiy 2007-02-01 17:20:34 Re: BUG #2954: null is not checked against domain constraints in return clause