Re: [HACKERS] inet increment with int

2006-05-01 Thread Patrick Welche
On Sat, Apr 29, 2006 at 10:24:48PM -0400, Bruce Momjian wrote: FYI, 8.2 will have this and more based on this applied patch: Add INET/CIDR operators: and, or, not, plus int8, minus int8, and inet minus inet. I know, I'm already using it :-) Thanks, Patrick

Re: [HACKERS] inet increment with int

2006-04-30 Thread Bruce Momjian
FYI, 8.2 will have this and more based on this applied patch: Add INET/CIDR operators: and, or, not, plus int8, minus int8, and inet minus inet. Stephen R. van den Berg --- Patrick

Re: [HACKERS] inet increment with int

2005-09-16 Thread Bruce Momjian
This has been saved for the 8.2 release: http://momjian.postgresql.org/cgi-bin/pgpatches_hold --- Patrick Welche wrote: Ilya Kovalenko posted some code at in a thread starting at

Re: [HACKERS] inet increment with int

2005-09-16 Thread Patrick Welche
On Fri, Sep 16, 2005 at 06:36:56AM -0400, Bruce Momjian wrote: This has been saved for the 8.2 release: It isn't actually a patch for application yet ;-) It is the function in a state that is easy to test. I take it that as I have basically had no comments back, I will just go ahead and make a

Re: [HACKERS] inet increment with int

2005-09-16 Thread Bruce Momjian
Patrick Welche wrote: On Fri, Sep 16, 2005 at 06:36:56AM -0400, Bruce Momjian wrote: This has been saved for the 8.2 release: It isn't actually a patch for application yet ;-) It is the function in a state that is easy to test. I take it that as I have basically had no comments back, I

Re: [HACKERS] inet increment with int

2005-09-07 Thread Patrick Welche
On Wed, Sep 07, 2005 at 02:48:00AM -, Andrew - Supernews wrote: On 2005-09-06, Patrick Welche [EMAIL PROTECTED] wrote: Now with: test=# select '192.168.0.0/24'::inet + 1; ERROR: Trying to increment a network (192.168.0.0/24) rather than a host What possible justification is there

Re: [HACKERS] inet increment with int

2005-09-07 Thread Sam Mason
Patrick Welche wrote: Comments anyone? Is incrementing an inet address a valid thing to do, or is its meaning too open to interpretation? How about either a pair of functions, one for incrementing the network and another for the host, or a combined function that allows you to work with both

Re: [HACKERS] inet increment with int

2005-09-06 Thread Patrick Welche
On Mon, Sep 05, 2005 at 08:10:16PM +0100, Patrick Welche wrote: On Mon, Sep 05, 2005 at 03:02:55PM -0400, Tom Lane wrote: Patrick Welche [EMAIL PROTECTED] writes: * Allow INET + INT4 to increment the host part of the address, or throw an error on overflow I think that the naively

Re: [HACKERS] inet increment with int

2005-09-06 Thread Andrew - Supernews
On 2005-09-06, Patrick Welche [EMAIL PROTECTED] wrote: Now with: test=# select '192.168.0.0/24'::inet + 1; ERROR: Trying to increment a network (192.168.0.0/24) rather than a host What possible justification is there for this behaviour? test=# select '192.168.0.1/24'::inet + -1; ERROR:

[HACKERS] inet increment with int

2005-09-05 Thread Patrick Welche
Ilya Kovalenko posted some code at in a thread starting at http://archives.postgresql.org/pgsql-hackers/2005-04/msg00417.php which lead to the TODO item: * Allow INET + INT4 to increment the host part of the address, or throw an error on overflow I think that the naively coded function

Re: [HACKERS] inet increment with int

2005-09-05 Thread Tom Lane
Patrick Welche [EMAIL PROTECTED] writes: * Allow INET + INT4 to increment the host part of the address, or throw an error on overflow I think that the naively coded function attached does what is needed, e.g., What happened to the IPv6 case? Also, I think you need to reject CIDR inputs.

Re: [HACKERS] inet increment with int

2005-09-05 Thread Patrick Welche
On Mon, Sep 05, 2005 at 03:02:55PM -0400, Tom Lane wrote: Patrick Welche [EMAIL PROTECTED] writes: * Allow INET + INT4 to increment the host part of the address, or throw an error on overflow I think that the naively coded function attached does what is needed, e.g., What happened to