From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Richard Welty <rwelty(at)averillpark(dot)net> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: indices and cidr/inet type |
Date: | 2003-08-05 22:46:47 |
Message-ID: | 13850.1060123607@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Richard Welty <rwelty(at)averillpark(dot)net> writes:
> On Tue, 05 Aug 2003 15:09:00 -0400 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | The Hermit Hacker | 2003-08-06 00:00:53 | v7.4 Beta 1 Bundle Available for Testing ... |
Previous Message | Joshua D. Drake | 2003-08-05 22:28:35 | Re: optimum postgres server configuration |