Re: inet increment w/ int8

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: "Ilya A(dot) Kovalenko" <shadow(at)oganer(dot)net>, Bruce Momjian <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: inet increment w/ int8
Date: 2005-04-19 20:48:56
Message-ID: 20050419204856.GB18200@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 19, 2005 at 12:03:27 -0400,
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> wrote:
>
> Agreed. Let's implement '+/-' for 'inet + int4' and put it in the
> backend as standard (I can help do the system table stuff if you give me
> the C functions). However, how do we handle cases where int4 > 255. I
> am thinking we should support only inet + inet, like this:
>
> SELECT '1.2.3.4'::inet + '0.0.1.2'::inet;

I don't think this operation makes much sense. Adding an integer makes
some sense, but I think the original problem would be better solved
by having a set returning function generate the possible network addresses
to be allocated and store that set in a table.

I don't think assuming everthing is a /24 is a good idea. If wrapping is
to be done, there should be some mask specified.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2005-04-19 21:33:58 Re: Bad n_distinct estimation; hacks suggested?
Previous Message Tom Lane 2005-04-19 20:44:49 Re: Bad n_distinct estimation; hacks suggested?