Re: indices and cidr/inet type - Mailing list pgsql-general

From Oleg Bartunov
Subject Re: indices and cidr/inet type
Date
Msg-id Pine.GSO.4.56.0308061045530.21631@ra.sai.msu.su
Whole thread Raw
In response to Re: indices and cidr/inet type  (Richard Welty <rwelty@averillpark.net>)
List pgsql-general
On Tue, 5 Aug 2003, Richard Welty wrote:

> On Tue, 05 Aug 2003 15:09:00 -0400 Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> > Richard Welty <rwelty@averillpark.net> writes:
> > > what type of index is recommended when the dominant lookup on a field
> > is
> > > '<networkaddress>' << ipblock
> >
> > 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.
> > I'm not sure which one would be more suitable, but probably you could
> > handle << with one or the other.
>
> hmmm. where should i go looking for sample code implementing operator
> classes as an example?

you may look at http://www.sai.msu.su/~megera/postgres/gist/tree/README.tree.english



>
> by way of context, i do a _lot_ of email work, and my client of the moment
> is the owner of an ISP who is migrating his user & system configurations
> into postgresql as much as he possibly can. this includes his list of
> allowed mail relay hosts and locally blacklisted spam sources. while the
> tables aren't that large right now and the planner probably wouldn't use an
> index even if one existed, i can definitely see fast << operations on CIDR
> and INET types as being more than a little valuble in cases where things do
> get large.
>
> richard
> --
> Richard Welty                                         rwelty@averillpark.net
> Averill Park Networking                                         518-573-7592
>     Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo@postgresql.org so that your
>       message can get through to the mailing list cleanly
>

    Regards,
        Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

pgsql-general by date:

Previous
From: Mario Weilguni
Date:
Subject: pg_xlog question
Next
From: "Bjorn T Johansen"
Date:
Subject: Re: Column number 4 is out of range 0..3 ?