Re: match_clause_to_indexcol()

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: match_clause_to_indexcol()
Дата
Msg-id 15184.1290276110@sss.pgh.pa.us
обсуждение исходный текст
Ответ на match_clause_to_indexcol()  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: match_clause_to_indexcol()  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> 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?

+1.  I think the existing coding dates from a time when we didn't have
IndexOptInfo at all, or at least didn't pass it around to all these
sub-functions, so there was no other path for getting at the info.

But if you're going to do that, get rid of DoneMatchingIndexKeys
altogether, along with the extra zero that plancat.c adds to the
opfamily array.  We don't need to be using more than one way to
iterate over those arrays.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: match_clause_to_indexcol()
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [PATCH] Custom code int(32|64) => text conversions out of performance reasons