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 1ifOdQ-0007xk-ND for pgsql-general@arkaria.postgresql.org; Thu, 12 Dec 2019 13:36:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ifOdP-0008CO-I5 for pgsql-general@arkaria.postgresql.org; Thu, 12 Dec 2019 13:36:03 +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 1ifOdP-0008CH-56 for pgsql-general@lists.postgresql.org; Thu, 12 Dec 2019 13:36:03 +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 1ifOdM-0006RL-A7 for pgsql-general@lists.postgresql.org; Thu, 12 Dec 2019 13:36:02 +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 xBCDZrni025767; Thu, 12 Dec 2019 08:35:53 -0500 From: Tom Lane To: Karsten Hilbert cc: pgsql-general@lists.postgresql.org Subject: Re: Encoding/collation question In-reply-to: <20191212093713.GA3164@hermes.hilbert.loc> References: <24866.1576092317@sss.pgh.pa.us> <875zimb0j8.fsf@news-spur.riddles.org.uk> <20191212093713.GA3164@hermes.hilbert.loc> Comments: In-reply-to Karsten Hilbert message dated "Thu, 12 Dec 2019 10:37:13 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <25765.1576157753.1@sss.pgh.pa.us> Date: Thu, 12 Dec 2019 08:35:53 -0500 Message-ID: <25766.1576157753@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Karsten Hilbert writes: > Question: is C collation expected to be future-proof / > rock-solid /stable -- like UTF8 for encoding choice -- or > could it end up like the SQL-ASCII encoding did: Yeah, we > support it, it's been in use a long time, it should work, > but, nah, one doesn't really want to choose it over UTF8 if > at all possible, or at least know *exactly* what one is doing > and BTW YMMV ? C collation basically devolves to strcmp/memcmp, which are as standard and well-defined as can be. If you're happy with the way it sorts things then there's no reason not to use it. It's actually all the *other* collations where you should worry about their behavior being a moving target :-(. regards, tom lane