I want to bring my text hash function into GIN indexer.
See the Extensibility below:
http://www.postgresql.org/docs/9.0/static/gin-extensibility.html
I can understand about compare.
int compare(Datum a, Datum b)
However how about extractValue, extractQuery and consistent.
Datum *extractValue(Datum inputValue, int32 *nkeys)
Datum *extractQuery(Datum query, int32 *nkeys, StrategyNumber n, bool **pmatch, Pointer **extra_data)
bool consistent(bool check[], StrategyNumber n, Datum query, int32 nkeys, Pointer extra_data[], bool *recheck)
The manual doesn't help me to implement them.
I know how to implement them. In detail:
- What's passed to inputValue of extractValue?
- What's returned by extractValue?
- What's passed to query of extractQuery?
- What's returned by extractQuery?
- What's passed to query of consistent?
- What's passed to check of consistent?
The index storage (hashed key) will be int4. The input type is text.