Re: [HACKERS] A small problem with the new inet and cidr types

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] A small problem with the new inet and cidr types
Дата
Msg-id 4320.910021838@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] A small problem with the new inet and cidr types  (darcy@druid.net (D'Arcy J.M. Cain))
Ответы Re: [HACKERS] A small problem with the new inet and cidr types
RE: [HACKERS] A small problem with the new inet and cidr types
Список pgsql-hackers
darcy@druid.net (D'Arcy J.M. Cain) writes:
> OK, there are more problems.  If you apply the following patch to the
> regression tests you will crash the backend in a number of places.

Yipes!

I must withdraw my prior opinion that we should shoehorn in a repair to
the INET datatypes for this case.  It's clear that we have a wideranging
problem that ought to be fixed more globally.  But presumably it's
been there for quite a while, and we didn't know it; therefore it's not
critical enough to hold up the release.

My guess is that maybe this should not be fixed in the individual
datatypes at all; instead the generic function and operator code should
be modified so that if any input value is NULL, then NULL is returned as
the result without ever calling the datatype-specific code.

There might be specific operators for which this is not the right
behavior (although none spring to mind immediately).  In that case,
I think the best bet would be to have a per-operator flag, defaulting
to OFF, which could be turned on for those specific operators that are
prepared to cope with null inputs.

Thoughts?
        regards, tom lane


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

Предыдущее
От: The Hermit Hacker
Дата:
Сообщение: Re: [HACKERS] A small problem with the new inet and cidr types
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] A small problem with the new inet and cidr types