From: martin@antibodymx.net
To: pgsql-bugs@postgresql.org
Subject: BUG #9455: Subtracting an IPv6 /64 network() from its broadcast() results in an out of range error
Date: Thu, 06 Mar 2014 19:04:53 +0000
Message-ID: <20140306190453.1916.4090@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
The following bug has been logged on the website:
Bug reference: 9455
Logged by: Martin A. Brooks
Email address: martin@antibodymx.net
PostgreSQL version: 9.3.3
Operating system: Kubuntu 13.10 64 bit
Description:
Hello
By accident I did this:
ipso=# select broadcast('10.0.0.0/8') - network('10.0.0.0/8');
?column?
----------
16777215
(1 row)
ipso=# select
broadcast('2001:ba8:1f1:f12c::/64')-network('2001:ba8:1f1:f12c::/64');
ERROR: result is out of range
ipso=# select broadcast('2001:ba8:1f1:f12c::/64');
broadcast
------------------------------------------
2001:ba8:1f1:f12c:ffff:ffff:ffff:ffff/64
(1 row)
ipso=# select network('2001:ba8:1f1:f12c::/64');
network
------------------------
2001:ba8:1f1:f12c::/64
(1 row)
It's arguable that broadcast doesn't make much sense for IPv6 ranges.
Special casing v6 ranges for my purposes would be fine, but this result is
more surprise that I expected.
Regards
Martin.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: martin@antibodymx.net
Subject: Re: BUG #9455: Subtracting an IPv6 /64 network() from its broadcast() results in an out of range error
In-Reply-To: <20140306190453.1916.4090@wrigleys.postgresql.org>
References: <20140306190453.1916.4090@wrigleys.postgresql.org>
* 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