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.