From: | Stephane Bortzmeyer <bortzmeyer(at)nic(dot)fr> |
---|---|
To: | Gaini Rajeshwar <raja(dot)rajeshwar2006(at)gmail(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org mailing list" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Data types for IP address. |
Date: | 2011-02-23 12:44:21 |
Message-ID: | 20110223124421.GB5208@nic.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, Feb 23, 2011 at 05:39:26PM +0530,
Gaini Rajeshwar <raja(dot)rajeshwar2006(at)gmail(dot)com> 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.3/24 OR 1.2.3.4/255.255.255.0
What is the difference between 1.2.3.* and 1.2.3.0/24? For me, it is
exactly the same. If you just want the ability to INPUT 1.2.3.*, just
write a small conversion routine in your favorite programming
language.
> *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
From | Date | Subject | |
---|---|---|---|
Next Message | Ioana Danes | 2011-02-23 13:41:39 | Re: Logged statement apparently did not commited... |
Previous Message | Stephane Bortzmeyer | 2011-02-23 12:42:23 | Re: Data types for IP address. |