For a custom type to be used in a btree index, it is possible to create a
function in SQL (as opposed to C) that is used in the create operator class
statement to specify how equality is defined. A good example of this is
presented inhttp://www.cybertec.at/2013/11/operator-classes-explained/.
Is it possible to define functions in SQL (as opposed to C) to do the same
thing -- create an operator class -- for a gin index? According to the
documentation, there are four functions that would need to be defined:
overlap, contains, is contained by and equal [1]. If so, what would the
SQL function signature be?
Thanks
Andrew
[1] https://www.postgresql.org/docs/9.5/static/xindex.html