Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1j98d5-0006LB-Cm for pgsql-bugs@arkaria.postgresql.org; Tue, 03 Mar 2020 14:34:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j98d4-0003Ri-3U for pgsql-bugs@arkaria.postgresql.org; Tue, 03 Mar 2020 14:34:38 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j98d3-0003Ra-OD for pgsql-bugs@lists.postgresql.org; Tue, 03 Mar 2020 14:34:37 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j98d1-0000XR-AQ for pgsql-bugs@lists.postgresql.org; Tue, 03 Mar 2020 14:34:36 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 023EYVhv032280; Tue, 3 Mar 2020 09:34:31 -0500 From: Tom Lane To: lyutovmax@gmail.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: =?utf-8?b?QlVHICMxNjI4Njog0J3QtdC60L7RgNGA0LXQutGC0L3QviDRgNCw0LHQvtGC0LDQtdGCINGE0YPQvdC60YbQuNGPIGxvd2Vy?= In-reply-to: <16286-51c5b038027cf03d@postgresql.org> References: <16286-51c5b038027cf03d@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Tue, 03 Mar 2020 13:09:50 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <32278.1583246071.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 03 Mar 2020 09:34:31 -0500 Message-ID: <32279.1583246071@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk PG Bug reporting form writes: > =D0=97=D0=B0=D0=BF=D1=80=D0=BE=D1=81 select lower(convert_from(convert_t= o('=D0=A2=D0=B5=D0=A1=D1=82', 'UTF8'), 'UTF8')) > =D0=B2=D0=BE=D0=B7=D0=B2=D1=80=D0=B0=D1=89=D0=B0=D0=B5=D1=82 '=D0=A2=D0=B5= =D0=A1=D1=82' , =D0=B0 =D0=BD=D0=B5 '=D1=82=D0=B5=D1=81=D1=82' I don't speak Russian, but try it like this: ru=3D# select lower(convert_from(convert_to('=D0=A2=D0=B5=D0=A1=D1=82', 'U= TF8'), 'UTF8' collate "default")); lower = ------- =D1=82=D0=B5=D1=81=D1=82 (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