Re: cidr question (resent)

From: Alex Pilosov <alex(at)pilosoft(dot)com>
To: Mir S Islam <mislam(at)mindspring(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: cidr question (resent)
Date: 2001-12-13 03:37:03
Message-ID: Pine.BSO.4.10.10112122236180.24804-100000@spider.pilosoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Wed, 12 Dec 2001, Mir S Islam wrote:

> 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.

You need:
DELETE from ip_space where ip << '11.0.1.0/24'::cidr

<< is 'belongs to'.

-alex

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message David Stanaway 2001-12-13 03:39:07 Re: cidr question (resent)
Previous Message Mir S Islam 2001-12-13 02:32:42 cidr question (resent)