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

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

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

The patch looks correct to me. The correctness can also be rechecked like this:

```
--- a/src/backend/optimizer/path/indxpath.c
+++ b/src/backend/optimizer/path/indxpath.c
@@ -3372,6 +3372,9 @@ match_orclause_to_indexcol(PlannerInfo *root,
                /* Only the operator returning a boolean suit the
transformation. */
                if (get_op_rettype(opno) != BOOLOID)
                        break;
+               else {
+                       Assert(subClause->opresulttype == BOOLOID);
+               }
```

-- 
Best regards,
Aleksander Alekseev



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