From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: me@reynolds.tj
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16333: position() function not equivalent to strpos() function when comparing citext
Date: Thu, 02 Apr 2020 17:46:06 -0400
Message-ID: <28841.1585863966@sss.pgh.pa.us> (raw)
In-Reply-To: <9817af55-fbe4-b342-b641-637f1308ef96@2ndquadrant.com>
References: <16333-dd25eea9d90e244d@postgresql.org>
<12376.1585789484@sss.pgh.pa.us>
<9817af55-fbe4-b342-b641-637f1308ef96@2ndquadrant.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, peter.eisentraut@2ndquadrant.com, me@reynolds.tj, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16333: position() function not equivalent to strpos() function when comparing citext
In-Reply-To: <28841.1585863966@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox