gin index operator class functions in sql?

From: Andrew Geery <andrew(dot)geery(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: gin index operator class functions in sql?
Date: 2016-07-21 19:49:14
Message-ID: CANdn4xLsLFzgVAUGqCYpbEk38WCLE20AtAz-tVsj7UyNLe+yQQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2016-07-21 19:54:51 Re: 9.5: pg_stat_statement and pgbench execution time discrepancies
Previous Message David G. Johnston 2016-07-21 19:48:44 Re: Array value from table as parameter