Re: Best way to index IP data? - Mailing list pgsql-performance

From Florian Weimer
Subject Re: Best way to index IP data?
Date
Msg-id 82ir1wfqoo.fsf@mid.bfk.de
Whole thread Raw
In response to Re: Best way to index IP data?  (Michael Stone <mstone+postgres@mathom.us>)
Responses Re: Best way to index IP data?  (Michael Stone <mstone+postgres@mathom.us>)
List pgsql-performance
* Michael Stone:

>>Classful addressing is still part of many user interfaces, for
>>instance Cisco's IOS.  It's not just that the CLI accepts it, it's
>>also the standard[*] output format (that is, "192.0.2.0" instead of
>>"192.0.2.0/24"; if no prefix length is given, the one based on the
>>class is used).
>
> Again, is this at all ambiguous *in the context of a host IP*? (IOW,
> if I say that I recieved an IP packet from 10.0.0.1, are you really
> going to ask me to clarify the netmask?)

Hmm.  It's an argument for a separate CIDR type, not against a host
type.

I agree that a host type would be helpful.  I currently use check
constraints to ensure no one accidentally stores data of the wrong
type, which is not ideal (space is not a main concern at this point).

--
Florian Weimer                <fweimer@bfk.de>
BFK edv-consulting GmbH       http://www.bfk.de/
Kriegsstraße 100              tel: +49-721-96201-1
D-76133 Karlsruhe             fax: +49-721-96201-99

pgsql-performance by date:

Previous
From: Jakub Ouhrabka
Date:
Subject: Re: Linux/PostgreSQL scalability issue - problem with 8 cores
Next
From: Michael Stone
Date:
Subject: Re: Best way to index IP data?