Re: indices and cidr/inet type

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: indices and cidr/inet type
Дата
Msg-id 13850.1060123607@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: indices and cidr/inet type  (Richard Welty <rwelty@averillpark.net>)
Ответы Re: indices and cidr/inet type  (Richard Welty <rwelty@averillpark.net>)
Список pgsql-general
Richard Welty <rwelty@averillpark.net> writes:
> On Tue, 05 Aug 2003 15:09:00 -0400 Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I don't think we have a suitable index type at the moment; or more
>> accurately, we don't have a suitable operator class.  It would be an
>> interesting exercise to write an inet opclass for either rtree or GiST.

> hmmm. where should i go looking for sample code implementing operator
> classes as an example?

contrib.  Specifically, I'd suggest looking at contrib/seg, which
defines a datatype for "interval on the real line" and builds a GIST
opclass for it.  This seems like it'd map very easily to CIDR subnets.
There is a lot of cruft in contrib/seg that you don't need (at least
some coming from the fact that it originally was an rtree opclass not
a GiST opclass --- in GiST you can make your own choices about what
set of operators need to be supported, but seg just slavishly follows
the rtree design).  But it's a working example...

I'd also suggest trying to get Oleg and Teodor involved, as they are the
only active hackers who have done anything much with GiST.

            regards, tom lane

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

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: optimum postgres server configuration
Следующее
От: The Hermit Hacker
Дата:
Сообщение: v7.4 Beta 1 Bundle Available for Testing ...