Re: citext function overloads for text parameters

Поиск
Список
Период
Сортировка
От Shay Rojansky
Тема Re: citext function overloads for text parameters
Дата
Msg-id CADT4RqA-6R-tJ48JUcNJRu8QPucR=H5m5-_pWb3q-LC7HRh-hg@mail.gmail.com
обсуждение исходный текст
Ответ на citext function overloads for text parameters  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: citext function overloads for text parameters  (Sergey Mirvoda <sergey@mirvoda.com>)
Список pgsql-hackers

Thanks for the input. It's worth noting that the equality operator currently works in the same way: citext = text comparison is (surprisingly for me) case-sensitive.

My expectation was that since citext is supposed to be a case-insensitive *type*, all comparison operations involving it should be case-insensitive;

Comparison requires both things to be the same type.  The rules for implicitly converting one type to another prefer the core type text over the extension type citext.

IOW, there is no such operator =(citext,text) and thus "citext = text comparison" is technically invalid.

At this point we're sorta stuck with our choice, and while individual databases can implement their own functions and operators there is value in doing things the way the system provides to minimize future confusion and bugs.

OK, thanks for everyone's input. 

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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: citext function overloads for text parameters
Следующее
От: Sergei Kornilov
Дата:
Сообщение: Re: Having query cache in core