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.89) (envelope-from ) id 1ifOfN-000828-Dz for pgsql-general@arkaria.postgresql.org; Thu, 12 Dec 2019 13:38:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ifOfM-0003zE-1U for pgsql-general@arkaria.postgresql.org; Thu, 12 Dec 2019 13:38:04 +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 1ifOfL-0003z6-LU for pgsql-general@lists.postgresql.org; Thu, 12 Dec 2019 13:38:03 +0000 Received: from mail.appl-ecosys.com ([50.126.108.78]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ifOfJ-0006S4-Dc for pgsql-general@lists.postgresql.org; Thu, 12 Dec 2019 13:38:02 +0000 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id 4AC37262A79 for ; Thu, 12 Dec 2019 05:37:59 -0800 (PST) Date: Thu, 12 Dec 2019 05:37:59 -0800 (PST) From: Rich Shepard To: pgsql-general@lists.postgresql.org Subject: Re: Encoding/collation question In-Reply-To: <875zimb0j8.fsf@news-spur.riddles.org.uk> Message-ID: References: <24866.1576092317@sss.pgh.pa.us> <875zimb0j8.fsf@news-spur.riddles.org.uk> User-Agent: Alpine 2.20 (LNX 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, 12 Dec 2019, Andrew Gierth wrote: > Note that it's perfectly fine to use UTF8 encoding and C collation (this > has the effect of sorting strings in Unicode codepoint order); this is as > fast for comparisons as LATIN1/C is. Andrew, This is really useful insight. I've not thought of the relationship of encoding to collation (which I now know there isn't.) > For those cases where you need data to be sorted in a > culturally-meaningful order rather than in codepoint order, you can set > collations on specific columns or in individual queries. Not an issue for my work. :-) Thanks very much, Rich