Re: BUG #16333: position() function not equivalent to strpos() function when comparing citext

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #16333: position() function not equivalent to strpos() function when comparing citext
Дата
Msg-id 28841.1585863966@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #16333: position() function not equivalent to strpos()function when comparing citext  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: BUG #16333: position() function not equivalent to strpos()function when comparing citext  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-bugs
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> Arguably, there is a misdesign here, however.  Any function that does 
> some kind of text-in-text search where citext could plausbily offer 
> case-insensitive behavior will automatically fall back to the 
> case-sensitive version if citext doesn't offer its own variant.  The fix 
> would technically need to be that citext offers its own variant of every 
> potential such function, which is clearly not possible, or that casts 
> between text and citext are more restricted, which would make citext 
> nearly unusable.

Indeed.  There are some hundreds of built-in functions that take one
or more text arguments; how many of them would need citext variants?

> Doesn't seem fixable.  Collations are probably a better way of dealing 
> with this.

Yeah, now that we can do non-deterministic collations, it seems like
citext is on the road to obsolescence.  Do we have a documentation
example of how to build a simple CI collation?

            regards, tom lane



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: BUG #16333: position() function not equivalent to strpos()function when comparing citext
Следующее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: [BUG] non archived WAL removed during production crash recovery