Franck Martin <franck(at)sopac(dot)org> writes:
> I would greatly appreciate if someone could guide me through the
> methodology to build an index for a custom type or point me to some
> readings where the algorithm is explained (web, book, etc...).
The Programmer's Guide chapter "Interfacing Extensions To Indices"
outlines the procedure for making a new datatype indexable. It
only discusses the case of adding btree support for a new type,
though. For other index classes such as R-tree there are different
sets of required operators, which are not as well documented but
you can find out by looking at code for the already-supported
> I plan to use 3D geographical objects...
That's a bit hard since we don't have any indexes suitable for 3-D
coordinates --- the existing R-tree type is for 2-D objects. What's
more it assumes that coordinates are Euclidean, which is probably
not the model you want for geographical coordinates.
In theory you could build a new index type suitable for indexing
3-D points, using the R-tree code as a starting point. I wouldn't
class it as a project suitable for a newbie however :-(.
Depending on what your needs are, you might be able to get by with
projecting your objects into a flat 2-D coordinate system and using
an R-tree index in that space. It'd just be approximate but that
might be close enough for index purposes.
regards, tom lane
In response to
pgsql-hackers by date
|Next:||From: Alain Toussaint||Date: 2000-11-26 05:07:46|
|Subject: Re: Re: [NOVICE] Re: re : PHP and persistent connections|
|Previous:||From: Tom Lane||Date: 2000-11-26 02:55:18|
|Subject: Proposal for fixing IPC key assignment|
pgsql-general by date
|Next:||From: Andrew McMillan||Date: 2000-11-26 10:33:39|
|Subject: Re: Skipping numbers in a sequence.|
|Previous:||From: GH||Date: 2000-11-26 01:39:13|
|Subject: Re: PostgreSQL as windows 2000 Service|