Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1acUkq-0000nz-Ah for pgsql-admin@arkaria.postgresql.org; Sun, 06 Mar 2016 09:13:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1acUkp-00056o-Df for pgsql-admin@arkaria.postgresql.org; Sun, 06 Mar 2016 09:13:35 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1acUkn-00056U-CW for pgsql-admin@postgresql.org; Sun, 06 Mar 2016 09:13:33 +0000 Received: from shopzeus.com ([87.229.70.149]) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1acUkf-0002b9-Ne for pgsql-admin@postgresql.org; Sun, 06 Mar 2016 09:13:31 +0000 Received: from [127.127.127.127] (localhost [127.127.127.127]) (Authenticated sender: gandalf) by shopzeus.com (Postfix) with ESMTPSA id E8276889C486 for ; Sun, 6 Mar 2016 04:13:21 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shopzeus.com; s=shopzeus_com; t=1457255602; bh=mUfNCjLvsvje/bzuPeWKUra/NzgrFTBMX4D2wpr+dRI=; h=To:From:Subject:Date:From; b=JVOPfVAi61e4TTm5DRsZlHu2oK00jIl44wC5+T17snNbemTOYDnN4CjC3ipbxcq0b +URe9tIMpi3aXyjLdheWYz43M4a3vs0x/nbo+eCqW5RWpnaI8hqHYp4n+77Sq1jDh8 71ZkwP9o6eLkLo6sXHqgx5GebTPVZuV4eechEn2ipe1Tyhx7A8G9Ai7Sy3UzDSYhpv OpuvUoKvsaKp0rkFbd/UbzacZNTPKNZD5m83JpZxqvswMP2g9wOdNJctxJ4CZeLxGZ y6olRbR7eiJuR5NG9HQYWv0Z8hfbexdyReGqzfjdGhYAbPDwzC+3mHNLvDP5xtMdy4 dVmJyxByHxR+g== To: pgsql-admin@postgresql.org From: =?UTF-8?Q?Nagy_L=c3=a1szl=c3=b3_Zsolt?= Subject: How to setup a good collation? Message-ID: <56DBF4B7.1050200@shopzeus.com> Date: Sun, 6 Mar 2016 10:13:27 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -4.3 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Example database on a Unix system: CREATE DATABASE test TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'hu_HU.UTF-8' LC_CTYPE = 'hu_HU.UTF-8' CONNECTION LIMIT = -1; \c test create table a (name text collate "hu_HU.UTF-8"); insert into a values ('a'); insert into a values ('á'); insert into a values ('Á'); insert into a values ('b'); insert into a values ('e'); insert into a values ('é'); insert into a values ('É'); insert into a values ('o'); insert into a values ('ó'); insert into a values ('ö'); insert into a values ('U'); insert into a values ('Ü'); insert into a values ('Z'); select name from a order by upper(name) asc; Results in: "a" "b" "e" "o" "U" "Z" "á" "Á" "é" "É" "ó" "ö" "Ü" Which is bad. The good order should be the following: "a" "á" "Á" "b" "e" "é" "É" "o" "ó" "ö" "U" "Ü" "Z" What is wrong with my collaction setup? Thanks, Laszlo -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin