Re: Best way to index IP data?

Поиск
Список
Период
Сортировка
От Andrew Sullivan
Тема Re: Best way to index IP data?
Дата
Msg-id 20080111230055.GB7618@crankycanuck.ca
обсуждение исходный текст
Ответ на Re: Best way to index IP data?  (Steve Atkins <steve@blighty.com>)
Ответы Re: Best way to index IP data?  (Steve Atkins <steve@blighty.com>)
Re: Best way to index IP data?  (Michael Stone <mstone+postgres@mathom.us>)
Список pgsql-performance
On Fri, Jan 11, 2008 at 02:38:27PM -0800, Steve Atkins wrote:
> I don't think there's ambiguity about what an dotted-quad without a
> netmask
> means, and hasn't been for a long time. Am I missing something?

Well, maybe.  The problem is actually that, without a netmask under CIDR,
the address alone isn't really enough.  You have to have a netmask to get
the packets to the destination.  As it happens, we have some nice
conventions, defined in the RFCs, for how to interpret hosts with no
netmask; note though that some of those are only for humans.  Or, to put it
another way, without context, a dotted-quad is insufficient on its own.
What you're really arguing is that the context ought to be storable
somewhere else (maybe in a human's brain).  I'm not suggesting that's wrong,
but I can see the "correctness" argument that someone might have made to get
to the datatype as it exists.  I think calling it "needless bloat" is just
holding it to the wrong criteria.

If you look at the binary wire data, that netmask is always represented in
some sense.  It can sometimes be more compact than the general-purpose data
type, though, no question.  This is why somewhere in this thread someone
talked about optimisation: there certainly are ways to make these things
more compact.

A

В списке pgsql-performance по дате отправления:

Предыдущее
От: Pomarede Nicolas
Дата:
Сообщение: Re: Best way to index IP data?
Следующее
От: Steve Atkins
Дата:
Сообщение: Re: Best way to index IP data?