From: Mir S Islam <mislam@mindspring.com>
To: pgsql-sql@postgresql.org
Subject: cidr question (resent)
Date: Wed, 12 Dec 2001 18:32:42 -0800
Message-ID: <002d01c1837e$710f7180$0100a8c0@sjc.mindspring.net> (raw)
Resending this. Aplogies for duplicates if any.
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: mislam@mindspring.com
Subject: Re: cidr question (resent)
In-Reply-To: <002d01c1837e$710f7180$0100a8c0@sjc.mindspring.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox