From: Florian Weimer <Florian.Weimer@RUS.Uni-Stuttgart.DE>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-sql@postgresql.org
Subject: Re: Determining if two subnets intersect
Date: 25 Jul 2001 09:17:23 +0200
Message-ID: <tg66ch32bg.fsf@mercury.rus.uni-stuttgart.de> (raw)
In-Reply-To: <20287.996043766@sss.pgh.pa.us>
References: <tgn15v8tyq.fsf@mercury.rus.uni-stuttgart.de>
<20287.996043766@sss.pgh.pa.us>
Tom Lane <tgl@sss.pgh.pa.us> writes:
> Florian Weimer <Florian.Weimer@RUS.Uni-Stuttgart.DE> writes:
> > Is there some efficient PostgreSQL expression which is true if and
> > only if two subnets (given as values of type cidr) have non-empty
> > intersection (even if the intersection is not a CIDR network)?
>
> Maybe I'm missing something, but ISTM it's only possible for two
> CIDR subnets to overlap if one contains the other. So you could
> check with
>
> A <<= B OR B <<= A
Oh, I think you are right; I haven't paid attention. Thanks.
--
Florian Weimer Florian.Weimer@RUS.Uni-Stuttgart.DE
University of Stuttgart http://cert.uni-stuttgart.de/
RUS-CERT +49-711-685-5973/fax +49-711-685-5898
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: Florian.Weimer@RUS.Uni-Stuttgart.DE, tgl@sss.pgh.pa.us
Subject: Re: Determining if two subnets intersect
In-Reply-To: <tg66ch32bg.fsf@mercury.rus.uni-stuttgart.de>
* 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