From: | Gaetano Mendola <mendola(at)bigfoot(dot)com> |
---|---|
To: | "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org> |
Cc: | Devin Atencio <devin(at)burgoyne(dot)com> |
Subject: | Re: Datatype Inet and Searching |
Date: | 2003-12-03 18:02:34 |
Message-ID: | 3FCE253A.5010105@bigfoot.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Devin Atencio wrote:
>
>
> Dear Users,
>
>
>
> I am very new to using the inet data type and I have a database with a
> list of CIDRs in it
>
> And I was hoping to be able to do some kind of select statement that
> would pull the record
>
> That the IP given is located in for example. If in my database I have a
> record like:
>
>
>
> Id cidr name
>
> 1 10.0.0.0/30 user1
>
> 2 10.0.0.4/30 user2
>
> 3 10.0.0.8/30 user3
>
>
>
> I was hoping to be able to do something like:
>
> Select * from mytable where cidr <<=’10.0.0.5’
select * from mytable where cider >>= '10.0.0.5'
The operation a >>= b mean:
a contain or is equal b.
Regards
Gaetano Mendola
From | Date | Subject | |
---|---|---|---|
Next Message | Guy Fraser | 2003-12-03 18:32:47 | Re: Datatype Inet and Searching |
Previous Message | Clint Stotesbery | 2003-12-03 17:26:49 | Re: Create Trigger porting problem from Oracle to PostgreSQL7.3.2 |