Skip site navigation (1) Skip section navigation (2)

Documentation: GiST extension implementation

From: Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Documentation: GiST extension implementation
Date: 2009-04-29 13:43:44
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

The following documentation page explains the GiST API to extensions authors:

I think we should be a little more verbose, and at least explains some more 
the big picture: same/consistent/union are responsible for correctness of the 
index while penalty and picksplit are responsible for performances of it, 
which leaves compress/decompress, to use when leaf/nodes are not the same 

This leaf/node construct is explained in the last paragraph of following page, 
but can exists directly into the C module too:

The consistent and union should get a lot of attention, and when exactly do 
your operators need RECHECK is still unclear to me. It's hard to give precise 
advices about consistent/union in a generic way, but I've been given the 
following general rule (thanks RhodiumToad):
  (z is consistent with x) implies (z is consistent with union(x,y))

What's unclear too is memory management: when to palloc() and when to reuse 
arguments given by -core GiST support functions. I know it was a game of trial 
and error to get it right, and while I know it's working now, I'd be in a bad 
position to explain how and why. Maybe reading the source code is what to do 
here, but a detailed API expectancies page in the documentation wouldn't 


I didn't propose a real doc patch mainly because english isn't my native 
language, and while you'll have to reword the content...


pgsql-hackers by date

Next:From: Kevin GrittnerDate: 2009-04-29 14:13:25
Subject: Re: idea: global temp tables
Previous:From: Peter EisentrautDate: 2009-04-29 10:33:33
Subject: Re: idea: global temp tables

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group