Re: inet increment w/ int8

From: Bruno Wolff III
Subject: Re: inet increment w/ int8
Date: ,
Msg-id: 20050419204856.GB18200@wolff.to
(view: Whole thread, Raw)
In response to: Re: inet increment w/ int8  (Bruce Momjian)
List: pgsql-hackers

Tree view

inet increment w/ int8  ("Ilya A. Kovalenko", )
 Re: inet increment w/ int8  ("Ilya A. Kovalenko", )
 Re: inet increment w/ int8  (Bruce Momjian, )
  Re: inet increment w/ int8  ("Ilya A. Kovalenko", )
   Re: inet increment w/ int8  (Bruce Momjian, )
    Re: inet increment w/ int8  (Greg Stark, )
     Re: inet increment w/ int8  (Bruce Momjian, )
      Re: inet increment w/ int8  (Greg Stark, )
       Re: inet increment w/ int8  ("Ilya A. Kovalenko", )
        Re: inet increment w/ int8  (Bruno Wolff III, )
      Re: inet increment w/ int8  ("Ilya A. Kovalenko", )
    Re: inet increment w/ int8  (Bruno Wolff III, )
  Re: inet increment w/ int8  (Patrick Welche, )
 Re: inet increment w/ int8  (Bruce Momjian, )
  Re: inet increment w/ int8  (Douglas McNaught, )
   Re: inet increment w/ int8  (Bruce Momjian, )
    Re: inet increment w/ int8  (Stephen Frost, )
    Re: inet increment w/ int8  ("Sander Steffann", )

On Tue, Apr 19, 2005 at 12:03:27 -0400, Bruce Momjian <> 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.



pgsql-hackers by date:

From: "Jim C. Nasby"
Date:
Subject: Re: argtype_inherit() is dead code
From: Bruce Momjian
Date:
Subject: Re: [GENERAL] Idea for the statistics collector