From: | "Charles Clavadetscher" <clavadetscher(at)swisspug(dot)org> |
---|---|
To: | "'Alexander Farber'" <alexander(dot)farber(at)gmail(dot)com>, "'pgsql-general'" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: lower() silently fails for 9.5.3 on Windows, but works on Mac, Linux |
Date: | 2016-08-08 07:29:47 |
Message-ID: | 017601d1f146$aa7341e0$ff59c5a0$@swisspug.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello
> From: pgsql-general-owner(at)postgresql(dot)org [mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Alexander Farber
> Sent: Montag, 8. August 2016 09:10
> To: pgsql-general <pgsql-general(at)postgresql(dot)org>
> Subject: Re: [GENERAL] lower() silently fails for 9.5.3 on Windows, but works on Mac, Linux
>
> More info:
>
> # \l+
>
> Name | Owner | Encoding | Collate | Ctype |
> -----------+---------+----------+---------+-------+
> postgres | user1 | UTF8 | C | C |
> template0 | user1 | UTF8 | C | C |
> | | | | |
> template1 | user1 | UTF8 | C | C |
> | | | | |
> words | user1 | UTF8 | C | C |
I cannot test on 9.5, which you are using, but I was able to reproduce the problem on 9.3:
kofadmin(at)kofdb(dot)localhost=> CREATE DATABASE test TEMPLATE template0 ENCODING 'UTF8' LC_COLLATE 'C' LC_CTYPE 'C';
CREATE DATABASE
kofadmin(at)kofdb(dot)localhost=> \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+----------+----------+----------------------------+----------------------------+-----------------------
kofdb | kofadmin | UTF8 | English_United States.1252 | English_United States.1252 |
test | kofadmin | UTF8 | C | C |
kofadmin(at)kofdb(dot)localhost=> \c test
psql (9.6devel, server 9.3.6)
You are now connected to database "test" as user "kofadmin".
kofadmin(at)test(dot)localhost=> select lower('P'); <-- This works (latin letters)
lower
-------
p
(1 row)
kofadmin(at)test(dot)localhost=> select lower('И'); <-- This does not work (cyrillic)
lower
-------
И
(1 row)
kofadmin(at)test(dot)localhost=> \c kofdb
psql (9.6devel, server 9.3.6)
You are now connected to database "kofdb" as user "kofadmin".
kofadmin(at)kofdb(dot)localhost=> select lower('И'); <-- This works on a DB with another collation and ctype
lower
-------
и
(1 row)
It seems to be a problem with collation and or ctype.
What are the settings of the database on your Linux system where all works correct?
Bye
Charles
From | Date | Subject | |
---|---|---|---|
Next Message | Charles Clavadetscher | 2016-08-08 08:02:11 | Re: lower() silently fails for 9.5.3 on Windows, but works on Mac, Linux |
Previous Message | Alexander Farber | 2016-08-08 07:09:53 | Re: lower() silently fails for 9.5.3 on Windows, but works on Mac, Linux |