public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: David G. Johnston <[email protected]>
Cc: [email protected]
Cc: Pg Docs <[email protected]>
Subject: Re: Does the POSITION() function takes into account the COLLATION... or not ?!?
Date: Wed, 16 Feb 2022 11:18:46 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAKFQuwavkvERHKc=-Ws=1YEXy68j4GpJx0XbUwbKbY-=hKs7zQ@mail.gmail.com>
References: <[email protected]>
<CAKFQuwavkvERHKc=-Ws=1YEXy68j4GpJx0XbUwbKbY-=hKs7zQ@mail.gmail.com>
"David G. Johnston" <[email protected]> writes:
> On Tue, Feb 15, 2022 at 11:17 AM PG Doc comments form <
> [email protected]> 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
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: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: Does the POSITION() function takes into account the COLLATION... or not ?!?
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox