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

Поиск
Список
Период
Сортировка
От PG Bug reporting form
Тема BUG #16333: position() function not equivalent to strpos() function when comparing citext
Дата
Msg-id 16333-dd25eea9d90e244d@postgresql.org
обсуждение исходный текст
Ответы Re: BUG #16333: position() function not equivalent to strpos()function when comparing citext  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: BUG #16333: position() function not equivalent to strpos() function when comparing citext  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
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.


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

Предыдущее
От: Abdallah Farouk
Дата:
Сообщение: Help to Install Postgre SQL
Следующее
От: Doug Johnson
Дата:
Сообщение: Postgres Installer not Appearing When Exe Is Run