Re: CIDR/INET improvements

From: Joachim Wieland <joe(at)mcknight(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: CIDR/INET improvements
Date: 2006-01-07 19:18:12
Message-ID: 20060107191812.GA3415@mcknight.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Sat, Jan 07, 2006 at 12:50:23PM -0500, Tom Lane wrote:
> Joachim Wieland <joe(at)mcknight(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeremy Drake 2006-01-07 19:27:17 Re: catalog corruption bug
Previous Message Tom Lane 2006-01-07 19:03:34 Re: catalog corruption bug

Browse pgsql-patches by date

  From Date Subject
Next Message Mark Kirkwood 2006-01-08 03:13:01 Re: Summary table trigger example race condition
Previous Message Tom Lane 2006-01-07 17:50:23 Re: CIDR/INET improvements