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

Поиск
Список
Период
Сортировка
От Sergiy Vyshnevetskiy
Тема Re: BUG #2948: default null values for not-null domains
Дата
Msg-id Pine.LNX.4.64.0702011939280.22446@uanet.vostok.net
обсуждение исходный текст
Ответ на Re: BUG #2948: default null values for not-null domains  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG #2948: default null values for not-null domains  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Thu, 1 Feb 2007, Tom Lane wrote:

> 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.

...
I have been slow.
If input function IS strict then nulls are ALWAYS accepted.
If input function IS NOT strict then nulls MIGHT be rejectted.

And the patch is much more simple now (attached).
Is that it?

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #2948: default null values for not-null domains
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #2948: default null values for not-null domains