Re: CIDR/INET improvements

Поиск
Список
Период
Сортировка
От Joachim Wieland
Тема Re: CIDR/INET improvements
Дата
Msg-id 20060107191812.GA3415@mcknight.de
обсуждение исходный текст
Ответ на Re: CIDR/INET improvements  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sat, Jan 07, 2006 at 12:50:23PM -0500, Tom Lane wrote:
> Joachim Wieland <joe@mcknight.de> writes:
> > Actually both types are not binary compatible, since they have a
> > type component that is either 0 or 1, depending on whether it is of type
> > INET or CIDR.

> The whole question of the relationship of those types really needs to be
> looked at more carefully.  We've got this schizophrenic idea that they
> sometimes are the same type and sometimes are not.  ISTM that either
> they are the same type (and having a bit within the data is reasonable)
> or they are distinct types (in which case the bit within the data should
> be redundant).  I'm not sure which is better.

What about doing both? ;-)

We could create a few wrapper functions that call the functions that are
there right now. That way there is no need to duplicate the code with the
actual functionality. The outside world sees different types and the
function can distinguish between both if it needs to.


Joachim


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: catalog corruption bug
Следующее
От: Jeremy Drake
Дата:
Сообщение: Re: catalog corruption bug