"David G. Johnston" <david.g.johns...@gmail.com> writes:
> On Tue, Feb 15, 2022 at 11:17 AM PG Doc comments form <
> nore...@postgresql.org> wrote:
>> ==> up to here, this seems pretty enough to conclude that POSITION()
>> doesn't
>> care at all about COLLATION and always perform a byte search.

> How collations behave is documented, in particular:

> "A collation is either deterministic or nondeterministic. A deterministic
> collation uses deterministic comparisons, which means that it considers
> strings to be equal only if they consist of the same byte sequence."

Right.  POSITION does indeed do bytewise search, which is a legal
implementation for any deterministic collation, but perhaps not
for a nondeterministic one.  Thus, it throws a feature-not-supported
error if asked to use a nondeterministic collation.  As you say,
this is far from the only function that acts that way.

                        regards, tom lane


Reply via email to