Of course, it is also possible to come up with your own operator classes. The following strategies are supported:
If you want to write operator classes for GiST, a couple of support functions have to be provided. In the case of a B-tree, there is only one function—GiST indexes provide a lot more:
Implementing operator classes for GiST indexes is usually done inC. If you are interested in a good example, I advise you to check out thebtree_GiSTmodule in the contrib directory. It shows how to index standard data types usingGiSTand is a good source of information, as well as inspiration.