Does the POSITION() function takes into account the COLLATION... or not ?!?

2022-02-15 Thread PG Doc comments form
The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/14/functions-string.html Description: The doc doesn't say anything about the impact of the COLLATION on the results of any of the string functions, so I tried some interesting tests with POSI

Re: Does the POSITION() function takes into account the COLLATION... or not ?!?

2022-02-16 Thread Peter Eisentraut
On 15.02.22 17:17, PG Doc comments form wrote: Does the POSITION() function pretends taking into account the COLLATION ?? or not ?? - If not, then why the hell is there this error message about nondeterministic collations while the POSITION() doesn't care at all about the COLLATION... - If yes,

Re: Does the POSITION() function takes into account the COLLATION... or not ?!?

2022-02-16 Thread Peter Eisentraut
On Wed, Feb 16, 2022 at 12:01 PM Pierre-Aurélien GEORGES < pierre-aurelien.geor...@univ-cotedazur.fr> wrote: > ok, let's take it forwards, then :-) > > Can someone provide some examples where a supported deterministic > collation is having an impact on the result of a call to function > POSITION()

Re: Does the POSITION() function takes into account the COLLATION... or not ?!?

2022-02-16 Thread David G. Johnston
On Tue, Feb 15, 2022 at 11:17 AM PG Doc comments form < nore...@postgresql.org> wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/14/functions-string.html > Description: > > > SELECT POSITION(('å' COLLATE "en_US.utf8") IN 'yeah')

Re: Does the POSITION() function takes into account the COLLATION... or not ?!?

2022-02-16 Thread Tom Lane
"David G. Johnston" 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 doc

Re: Does the POSITION() function takes into account the COLLATION... or not ?!?

2022-02-16 Thread Pierre-Aurélien GEORGES
ok, let's take it forwards, then :-) Can someone provide some examples where a supported deterministic collation is having an impact on the result of a call to function POSITION() ? (as I said in my message, examples would be greatly appreciated) Le 16/02/2022 à 11:56, Peter Eisentraut a éc