Re: How to implement a SP-GiST index as a extension module?
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexander Korotkov <a.korotkov@postgrespro.ru>
Cc: Oleg Bartunov <obartunov@gmail.com>,
Connor Wolf <wolf@imaginaryindustries.com>,
Pgsql Hackers <pgsql-hackers@postgresql.org>
Date: 2017-10-30T14:40:50Z
Lists: pgsql-hackers
Alexander Korotkov <a.korotkov@postgrespro.ru> writes: > I think Connor struggles to implement just an operator class. Advising him > to implement an index access method is a good way to get him away of > PostgreSQL hacking for a long time :) Yeah. To answer the question a bit more directly: there are not any contrib modules that add SP-GiST opclasses, but there are some that add GiST or GIN opclasses, so any one of those would serve as a model for the basic mechanism of writing an extension. Just replace the AM-specific support functions for those AMs with the ones SP-GiST uses. (You can crib some code details from the in-core SP-GiST support functions.) regards, tom lane
Commits
-
Support index-only scans in contrib/cube and contrib/seg GiST indexes.
- de1d042f5979 11.0 landed