From: Tom Lane <tgl@sss.pgh.pa.us>
To: Florian Weimer <Florian.Weimer@RUS.Uni-Stuttgart.DE>
Cc: pgsql-sql@postgresql.org
Subject: Re: Determining if two subnets intersect
Date: Wed, 25 Jul 2001 02:49:26 -0400
Message-ID: <20287.996043766@sss.pgh.pa.us> (raw)
In-Reply-To: <tgn15v8tyq.fsf@mercury.rus.uni-stuttgart.de>
References: <tgn15v8tyq.fsf@mercury.rus.uni-stuttgart.de>
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
regards, tom lane
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: tgl@sss.pgh.pa.us, Florian.Weimer@RUS.Uni-Stuttgart.DE
Subject: Re: Determining if two subnets intersect
In-Reply-To: <20287.996043766@sss.pgh.pa.us>
* 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