Re: Data types for IP address.

From: Sim Zacks <sim(at)compulab(dot)co(dot)il>
To: PostgreSQL general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Data types for IP address.
Date: 2011-02-23 12:30:18
Message-ID: 4D64FDDA.1040603@compulab.co.il
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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/255.255.255.0
> <http://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 datatype and inet datatype but it seems they
> support only partial of the above requirements. Any suggestions on
> what datatype is useful for this purpose?
>
> Thanks

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephane Bortzmeyer 2011-02-23 12:42:23 Re: Data types for IP address.
Previous Message Gaini Rajeshwar 2011-02-23 12:09:26 Data types for IP address.