From: Tom Lane <tgl@sss.pgh.pa.us>
To: lyutovmax@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16286: Некорректно работает функция lower
Date: Tue, 03 Mar 2020 09:34:31 -0500
Message-ID: <32279.1583246071@sss.pgh.pa.us> (raw)
In-Reply-To: <16286-51c5b038027cf03d@postgresql.org>
References: <16286-51c5b038027cf03d@postgresql.org>
PG Bug reporting form <noreply@postgresql.org> writes:
> Запрос select lower(convert_from(convert_to('ТеСт', 'UTF8'), 'UTF8'))
> возвращает 'ТеСт' , а не 'тест'
I don't speak Russian, but try it like this:
ru=# select lower(convert_from(convert_to('ТеСт', 'UTF8'), 'UTF8' collate "default"));
lower
-------
тест
(1 row)
Without that, the collation of the expression works out as "C" because
convert_from's second argument is of type "name", which since v12
has default collation "C". Then lower() won't do anything with
non-ASCII letters.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, lyutovmax@gmail.com
Subject: Re: BUG #16286: Некорректно работает функция lower
In-Reply-To: <32279.1583246071@sss.pgh.pa.us>
References: <16286-51c5b038027cf03d@postgresql.org> <32279.1583246071@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