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 12376.1585789484@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #16333: position() function not equivalent to strpos() function when comparing citext  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #16333: position() function not equivalent to strpos()function when comparing citext  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> SELECT position('foo'::citext IN 'Foobar'::citext) =
> strpos('Foobar'::citext, 'foo'::citext) as "positionEqualsStrpos";

> Citext does not create an overload for position() supporting citext
> parameters, therefore position(a in b) always runs case-sensitive.

Well, the citext documentation specifies which functions have
case-insensitive mappings.  strpos() is listed, position() is not,
so I'd say it's acting precisely as documented.

We could consider adding position() of course, but there's a
backwards-compatibility issue --- at this point, people may have
queries that depend on the current behavior.

            regards, tom lane



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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: BUG #16333: position() function not equivalent to strpos()function when comparing citext
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: BUG #16325: Assert failure on partitioning by int for a textvalue with a collation