Re: uniqueness not always correct - Mailing list pgsql-bugs

From Peter Eisentraut
Subject Re: uniqueness not always correct
Date
Msg-id Pine.LNX.4.21.0006020351140.372-100000@localhost.localdomain
Whole thread Raw
In response to Re: uniqueness not always correct  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Tom Lane writes:

[CIDR and INET]
> Alternatively, if no one cares enough about these types to even
> understand what they should do, maybe we should rip 'em out?

Actually, I'm a happy user of these types, so that would certainly make me
unhappy...

CIDR stores network addresses, so '10.8/16' might be some network. INET
stores both host addresses and, optionally, the network it's in, so
'10.8.7.6/16' is the given host in the network '10.8/16'. Alternatively,
INET '10.8.7.6' is just a host with no network. IMO, there is one of two
bugs in the CIDR input routine:

1) '10.8.7.6/16' in not rejected

2) Since it is accepted, at least the hidden fields need to be zeroed.

(But note that this bug is only exposed when you use the type improperly
in the first place.)

Using the same operators for cidr and inet is fine as long as this is
fixed.


--
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden

pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: double dumps for all objects with pg_dump
Next
From: Peter Eisentraut
Date:
Subject: Re: Bug Repoprt- Casting Issues