BUG #9652: inet types don't support min/max - Mailing list pgsql-bugs

From darius@dons.net.au
Subject BUG #9652: inet types don't support min/max
Date
Msg-id 20140321061735.28629.38477@wrigleys.postgresql.org
Whole thread Raw
Responses Re: BUG #9652: inet types don't support min/max  (Haribabu Kommi <kommi.haribabu@gmail.com>)
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      9652
Logged by:          Daniel O'Connor
Email address:      darius@dons.net.au
PostgreSQL version: 9.2.7
Operating system:   OSX Mavericks
Description:

reclog=> select * from foo;
   bar
---------
 1.2.3.4
(1 row)

reclog=> select min(bar) from foo;
ERROR:  function min(inet) does not exist
LINE 1: select min(bar) from foo;
               ^
HINT:  No function matches the given name and argument types. You might need
to add explicit type casts.

This is surprising to me since the inet type is ordered, hence min/max are
possible.

You also can't cast an inet to an integer or bigint although I guess that
isn't too surprising since v6 addrs are larger than bigints.

pgsql-bugs by date:

Previous
From: Marko Tiikkaja
Date:
Subject: Re: BUG #8870: PL/PgSQL, SELECT .. INTO and the number of result columns
Next
From: Alexander Hill
Date:
Subject: Re: BUG #8354: stripped positions can generate nonzero rank in ts_rank_cd