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

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: BUG #16333: position() function not equivalent to strpos()function when comparing citext
Дата
Msg-id CAKFQuwYYnVw_DKFT5mw9AxYMPb0PhHH6HTrA4pN+NSZVFzK4yQ@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #16333: position() function not equivalent to strpos() function when comparing citext  (PG Bug reporting form <noreply@postgresql.org>)
Список pgsql-bugs
On Wednesday, April 1, 2020, PG Bug reporting form <noreply@postgresql.org> wrote:
The following bug has been logged on the website:

Bug reference:      16333
Logged by:          Tyler Reynolds
Email address:      me@reynolds.tj
PostgreSQL version: 9.6.17
Operating system:   Windows 10
Description:       

To reproduce:

CREATE DATABASE test;
CREATE EXTENSION citext;

SELECT position('foo'::citext IN 'Foobar'::citext) =
strpos('Foobar'::citext, 'foo'::citext) as "positionEqualsStrpos";

Expected: "positionEqualsStrpos" returns TRUE.
Actual: "positionEqualsStrpos" returns FALSE.

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

Nor does it claim to so this isn’t a bug.  The fact that citext doesn’t work with the SQL functions seems intentional.

David J.

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

Предыдущее
От: Doug Johnson
Дата:
Сообщение: Postgres Installer not Appearing When Exe Is Run
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #16333: position() function not equivalent to strpos() function when comparing citext