From: | "Mir S Islam" <mislam(at)mindspring(dot)com> |
---|---|
To: | <pgsql-sql(at)postgresql(dot)org> |
Subject: | cidr question |
Date: | 2001-12-13 01:38:27 |
Message-ID: | 001b01c18376$dcdb8c80$0100a8c0@sjc.mindspring.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
maybe I am not understanding it right. Here is my problem.
I have a table like this
Attribute | Type | Modifier
--------------+--------------------------+----------
ip | cidr | not null
with following rows
ip
---------------
10.0.0.1/32
10.0.0.50/32
10.0.0.255/32
11.0.0.0/32
11.0.1.200/32
11.0.1.20/32
(6 rows)
should not the command
DELETE from ip_space where ip = '11.0.1.0/24'::cidr
delete last two rows ? But it does not delete anything. Basically I would
like to be able to delete a whole range or block of ip/network addresses.
I suppose I could rewrite the above sql as
delete from ip_space where ip >='11.0.1.0/24'::cidr and ip
<='11.0.2.0/24'::cidr;
Then it works. But I should not have to do that. Right ?
Thanks in advance. Please email and post here.
Mir
From | Date | Subject | |
---|---|---|---|
Next Message | Mir S Islam | 2001-12-13 02:32:42 | cidr question (resent) |
Previous Message | Jason Earl | 2001-12-12 17:40:39 | Re: Variable Length Binary String (not large) |