Use opresulttype instead of calling SearchSysCache1() in match_orclause_to_indexcol()

Поиск
Список
Период
Сортировка
От Tender Wang
Тема Use opresulttype instead of calling SearchSysCache1() in match_orclause_to_indexcol()
Дата
Msg-id CAHewXN=aH7GQBk4fXU-WaEeVmQWUmBAeNyBfJ3VKzPphyPKUkQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Use opresulttype instead of calling SearchSysCache1() in match_orclause_to_indexcol()
Re: Use opresulttype instead of calling SearchSysCache1() in match_orclause_to_indexcol()
Список pgsql-hackers
Hi,

While working on another issue, I stepped into match_orclause_to_indexcol().
I found below codes:

/* Only the operator returning a boolean suit the transformation. */
if (get_op_rettype(opno) != BOOLOID)
      break;

In get_op_rettype, it calls SearchSysCache1() to get oprresult of Form_pg_operator.
I think we can use the opresulttype of OpExpr to achieve the same effect, but there is no need to call SearchSysCache1().

Although this would not improve performance,  it can save some CPU time.
Any thoughts?

--
Thanks,
Tender Wang
Вложения

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