Re: [HACKERS] Definitional issue for INET types - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Definitional issue for INET types
Date
Msg-id 15690.950802559@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Definitional issue for INET types  (Sevo Stille <sevo@ip23.net>)
List pgsql-hackers
Sevo Stille <sevo@ip23.net> writes:
> I'll see whether I can figure out something consistent for the inet data
> type. As it is right now, we might just as well drop it - it is both
> synonymous to cidr and to a cidr /32 host, which simply can't be.
> Personally, I don't think we would lose any functionality if we drop it,
> as long as we have functions that return classed network structures like
> the base address and a networks subnettable range. 

Hmm.  One way to throw the question into stark relief is to ask:
Is '10/8' *equal to* '10.0.0.0/32', in the sense that unique indexes
and operations like SELECT DISTINCT should consider them identical?
Does your answer differ depending on whether you assume the values
are of CIDR or INET type?

Once we have decided if they are equal or not, we can certainly manage
to come up with a sort ordering for the cases that are not equal.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Definitional issue for INET types
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Almost there on column aliases