citext function overloads for text parameters
От | David G. Johnston |
---|---|
Тема | citext function overloads for text parameters |
Дата | |
Msg-id | CAKFQuwY9u14TqG8Yzj=fAB0tydvvtK7ibgFEx3tegbPWsGjJpg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: citext function overloads for text parameters (Shay Rojansky <roji@roji.org>) |
Ответы |
Re: citext function overloads for text parameters
|
Список | pgsql-hackers |
On Sunday, May 6, 2018, Shay Rojansky <roji@roji.org> wrote:
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.
David J.
В списке pgsql-hackers по дате отправления: