> > Have you looked at PostGIS? > Yes ofcourse, I also read everything in postgresql official documentation plus http://gist.cs.berkeley.edu/pggist/opcltour.html.
> Yeah, I still don't think that's the right way to do it. Storing the > bounding box seems right, but just do that for all the nodes. It's > probably worth looking at the implementation of these functions for, > say, the existing point, box, and polygon datatypes, which have > similar issues. > I intend to change the structure I describe in the future. So if it is not wrong and harmful to the implementation I want to keep that extra info in leaf node entries. I have read src/backend/access/gist/gistproc.c I am aware of what it does. According to the documentation, no. It takes a GISTENTRY and returns > a GISTENTRY. But you can extract the relevant key out of there. The > best way to do this, again, is to look at existing examples, like > gist_poly_compress. > Exactly what I am saying. I extract the key out of GISTENTRY of course but that key has to contain a value of some type. And my question is of what type if it is a leaf and of what if it is not a leaf entry? Thank you for helping.