agora inbox for postgres@postgres.berkeley.edu
help / color / mirror / Atom feedFrom: kilin@cs.UMD.EDU
To: postgres@postgres.Berkeley.EDU
Subject: Incorporating new access methods / polygons
Date: Thu, 15 Dec 1994 14:00:58 -0500
Message-ID: <199412151900.OAA05957@twinkie.cs.UMD.EDU> (raw)
Hello
I am working on adding additional spatial access method on Postgres and
have been trying to understand various source (like the source code and
pg.am -- thank for Paul Brown for that tip).
Two questions:
(A) Suppose I have a new access method code written. Assume say, I just
copy the R-tree code and renaming it R2-tree, residing in the
directory ......./backend/access/index-r2tree. What else do I have
to do to?
This is what I think should happen, can anyone point out any mistake?
(1) Create a Makefile.inc with the following statements:
.PATH: ${.CURDIR}/access/index-r2tree
SRCS+= r2tget.c r2tproc.c r2tree.c r2tscan.c r2tstrat.c
(2) Go to ..../backend/catalog/
(3) Edit pg_am by adding a DATA statement to insert the access method
to pg_am
DATA(insert OID = 1500 ( r2tree PGUID "o" ...........));
[A unique OID (from ALL other OIDS in other pg files) will be enough,
right? Or do the range of OID matters (like I should use 1-10 for
some function etc.)?]
(4) Edit pg_proc by adding a DATA statement to insert each interface
procedure to pg_proc
DATA(insert OID = 1600 ( r2tinsert PGUID "o" ...........));
[We only need to do this for the interface functions, like those
needed in pg_am, right?]
(5) Edit pg_amop.h, pg_amproc.h similarly to insert the tuples.
(6) Edit ...../backend/utils/builtin.h to include all the function
headers:
extern char* r2tinsert(); etc.
(7) If there is new selectivity functions, incoporate them
into .../backend/utils/adt/selfuncs.c
(8) Remake the whole thing (using bmake).
Anything I missed? Messed up? Any guidelines?
(B) Polygons. The polygon functions seems to be just manipulating
bounding boxes. Is it right? Is there a package to allow really
working with (multiside) polygons?
Hope it's not too long. Thanks a lot in advance.
David Lin
==============================================================================
To add/remove yourself to/from the POSTGRES mailing list: send mail with
the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU".
If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
a human will deal with it. DO NOT post to the "postgres" mailing list.
==============================================================================
URL: http://s2k-ftp.CS.Berkeley.EDU:8000/postgres/
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: postgres@postgres.berkeley.edu
Cc: kilin@cs.UMD.EDU
Subject: Re: Incorporating new access methods / polygons
In-Reply-To: <199412151900.OAA05957@twinkie.cs.UMD.EDU>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox