Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g0mjR-0008Hg-4q for pgsql-admin@arkaria.postgresql.org; Fri, 14 Sep 2018 11:57:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g0mjO-0005jk-SZ for pgsql-admin@arkaria.postgresql.org; Fri, 14 Sep 2018 11:57:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g0mjO-0005jd-LP for pgsql-admin@lists.postgresql.org; Fri, 14 Sep 2018 11:57:50 +0000 Received: from mx2.mailbox.org ([80.241.60.215]) by magus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1g0mjG-00076D-SC for pgsql-admin@postgresql.org; Fri, 14 Sep 2018 11:57:50 +0000 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id D9E17428E9; Fri, 14 Sep 2018 13:57:40 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by gerste.heinlein-support.de (gerste.heinlein-support.de [91.198.250.173]) (amavisd-new, port 10030) with ESMTP id BdOEssADwALG; Fri, 14 Sep 2018 13:57:39 +0200 (CEST) Message-ID: <0f5ad1359ca05bb3e77c346aa012b1df1d8f5429.camel@cybertec.at> Subject: Re: Difference between C and en_US.UTF-8 Collate & CType in Postgres 10.x From: Laurenz Albe To: Debraj Manna , pgsql-admin Date: Fri, 14 Sep 2018 13:57:38 +0200 In-Reply-To: References: Organization: Cybertec Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Debraj Manna wrote: > Can someone let me know what is the difference we are expected to observe if we set > Collate & Ctype to C as against en_US.UTF-8 with encoding set to UTF8 in both the cases ? For one, the ordering will be substantially different. Compare the result of these two queries: SELECT chr(i) FROM generate_series(1, 50000) i ORDER BY chr(i) COLLATE "C"; SELECT chr(i) FROM generate_series(1, 50000) i ORDER BY chr(i) COLLATE "en_US.utf8"; Yours, Laurenz Albe