Re: compress method for spgist - 2

Teodor Sigaev <teodor@sigaev.ru>

From: Teodor Sigaev <teodor@sigaev.ru>
To: Heikki Linnakangas <hlinnakangas@vmware.com>, Pgsql Hackers <pgsql-hackers@postgresql.org>
Date: 2014-12-16T17:48:25Z
Lists: pgsql-hackers

Attachments

 > For some datatypes, the compress method might be useful even if the leaf
 > type is the same as the column type. For example, you could allow
 > indexing text datums larger than the page size, with a compress function
 > that just truncates the input.

Agree, and patch allows to use compress method in this case, see begining of 
spgdoinsert()


 > Could you find some use for this in one of the built-in or contrib
 > types? Just to have something that exercises it as part of the
 > regression suite. How about creating an opclass for the built-in polygon
 > type that stores the bounding box, like the PostGIS guys are doing?

Will try, but I don't have nice idea. Polygon opclass will have awful 
performance until PostGIS guys show the tree structure.

 > The documentation needs to be updated.
Added.

-- 
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
                                                    WWW: http://www.sigaev.ru/

Commits

  1. Doc: remove duplicate poly_ops row from SP-GiST opclass table.

  2. Add polygon opclass for SP-GiST