I was looking at KNNGIST some more today and found myself trying to
disentangle what match_clause_to_indexcol() is actually doing. It
appears to me that the opfamily passed to that function is always the
same as index->opfamily[indexcol], which seems like needless
notational complexity. Maybe I'm missing something, but the attached
patch seems to make things simpler and clearer. Thoughts?
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company