Re: UTF8MatchText

Поиск
Список
Период
Сортировка
От ITAGAKI Takahiro
Тема Re: UTF8MatchText
Дата
Msg-id 20070409111732.8786.ITAGAKI.TAKAHIRO@oss.ntt.co.jp
обсуждение исходный текст
Ответ на Re: UTF8MatchText  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: UTF8MatchText
Re: UTF8MatchText
Список pgsql-patches
Bruce Momjian <bruce@momjian.us> wrote:

> > I do not understand this patch.  You have defined two functions,
> > UTF8MatchText() and UTF8MatchTextIC(), and the difference between them
> > is that one calls CHAREQ and the other calls ICHAREQ, but just above
> > those two functions you define the macros identically:
>
> Why are there two functions?  Also, can't you use one function and just
> pass a boolean to indicate whether case should be ignored?

The same is true of MBMatchText() and MBMatchTextIC().
Now, I'll split the patch into two changes.

1. DropMBMatchTextIC.patch
        Drop MBMatchTextIC() and use MBMatchText() instead.

2. UTF8MatchText.patch
        Add UTF8MatchText() as a specialized version of MBMatchText().


As a future work, it might be good to research the performance of rewriting
"col ILIKE 'pattern'" to "lower(col) LIKE lower('pattern')" in planner so that
we can avoid to call lower() for constant pattern in the right-hand side and
can use functional indexes (lower(col)). I think we never need MBMatchTextIC()
in the future unless we move to wide-character server encoding :)

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center


Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [DOCS] Fix misleading references to columns in GRANT/REVOKE summaries
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [DOCS] Fix misleading references to columns in GRANT/REVOKE summaries