Re: [GENERAL] Data types for IP address.

2011-02-24 Thread Gaini Rajeshwar
On Thu, Feb 24, 2011 at 1:10 AM, Michael Glaesemann wrote: > > On Feb 23, 2011, at 13:49, John R Pierce wrote: > > > On 02/23/11 4:44 AM, Stephane Bortzmeyer wrote: > >>> *3. Start-End IP format :* 1.2.3.0-1.2.3.255 > >> You don't even need to program the conversion, it is already done: > >>

Re: [GENERAL] Data types for IP address.

2011-02-24 Thread Gaini Rajeshwar
On Thu, Feb 24, 2011 at 3:03 AM, Tom Lane wrote: > John R Pierce writes: > > On 02/23/11 4:44 AM, Stephane Bortzmeyer wrote: > > *3. Start-End IP format :* 1.2.3.0-1.2.3.255 > >> You don't even need to program the conversion, it is already done: > >> > >> % netmask 1.2.3.0:1.2.3.255 > >> 1.

Re: [GENERAL] Data types for IP address.

2011-02-23 Thread John R Pierce
On 02/23/11 1:33 PM, Tom Lane wrote: The question is does he actually have a use-case for address ranges that don't correspond to legal CIDR ranges, but do nonetheless have an identifiable lower boundary, upper boundary, and no holes? And if so, what is it? The whole thing looked to me like som

Re: [GENERAL] Data types for IP address.

2011-02-23 Thread Tom Lane
John R Pierce writes: > On 02/23/11 4:44 AM, Stephane Bortzmeyer wrote: > *3. Start-End IP format :* 1.2.3.0-1.2.3.255 >> You don't even need to program the conversion, it is already done: >> >> % netmask 1.2.3.0:1.2.3.255 >> 1.2.3.0/24 > yes, but what about 10.1.2.57-10.1.2.123 ?presum

Re: [GENERAL] Data types for IP address.

2011-02-23 Thread Michael Glaesemann
On Feb 23, 2011, at 13:49, John R Pierce wrote: > On 02/23/11 4:44 AM, Stephane Bortzmeyer wrote: >>> *3. Start-End IP format :* 1.2.3.0-1.2.3.255 >> You don't even need to program the conversion, it is already done: >> >> % netmask 1.2.3.0:1.2.3.255 >> 1.2.3.0/24 > > yes, but what

Re: [GENERAL] Data types for IP address.

2011-02-23 Thread John R Pierce
On 02/23/11 4:44 AM, Stephane Bortzmeyer wrote: *3. Start-End IP format :* 1.2.3.0-1.2.3.255 You don't even need to program the conversion, it is already done: % netmask 1.2.3.0:1.2.3.255 1.2.3.0/24 yes, but what about 10.1.2.57-10.1.2.123 ?presumably valid in his range sys

Re: [GENERAL] Data types for IP address.

2011-02-23 Thread Stephane Bortzmeyer
On Wed, Feb 23, 2011 at 05:39:26PM +0530, Gaini Rajeshwar wrote a message of 52 lines which said: > I wanted to store ip addresses in table. I wanted to support the following 3 > types of ip addresses. > > *1. Wildcard format :* 1.2.3.* > * > * > *2. CIDR format:* 1.2.

Re: [GENERAL] Data types for IP address.

2011-02-23 Thread Stephane Bortzmeyer
On Wed, Feb 23, 2011 at 02:30:18PM +0200, Sim Zacks wrote a message of 97 lines which said: > a regular varchar or text field. Very bad idea since they don't support canonicalization (2001:db8::1 == 2001:db8:0:0:0:0:0:1) or masking (set_masklen(address, 20)). -- Sent via pgsql-general maili

Re: [GENERAL] Data types for IP address.

2011-02-23 Thread Sim Zacks
a regular varchar or text field. On 02/23/2011 02:09 PM, Gaini Rajeshwar wrote: Hi All, I wanted to store ip addresses in table. I wanted to support the following 3 types of ip addresses. |*1. Wildcard format :* 1.2.3.* * *| |*2. CIDR format:* 1.2.3/24 OR 1.2.3.4/2

[GENERAL] Data types for IP address.

2011-02-23 Thread Gaini Rajeshwar
Hi All, I wanted to store ip addresses in table. I wanted to support the following 3 types of ip addresses. *1. Wildcard format :* 1.2.3.* * * *2. CIDR format:* 1.2.3/24 OR 1.2.3.4/255.255.255.0 * * *3. Start-End IP format :* 1.2.3.0-1.2.3.255 I had a look at CIDR