Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cTuAV-0004iB-O0 for pgsql-committers@arkaria.postgresql.org; Wed, 18 Jan 2017 17:37:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cTuAV-0003el-9O for pgsql-committers@arkaria.postgresql.org; Wed, 18 Jan 2017 17:37:07 +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_2) (envelope-from ) id 1cTuAU-0003eM-Jm for pgsql-committers@postgresql.org; Wed, 18 Jan 2017 17:37:06 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cTuAQ-0003kN-Um for pgsql-committers@postgresql.org; Wed, 18 Jan 2017 17:37:05 +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 v0IHb1HZ019774; Wed, 18 Jan 2017 12:37:01 -0500 From: Tom Lane To: Peter Eisentraut cc: pgsql-committers@postgresql.org Subject: Re: pgsql: Add function to import operating system collations In-reply-to: <9b99c8c5-5a77-f1ae-6d90-bef0e85552a0@2ndquadrant.com> References: <26116.1484751196@sss.pgh.pa.us> <2083.1484754187@sss.pgh.pa.us> <9b99c8c5-5a77-f1ae-6d90-bef0e85552a0@2ndquadrant.com> Comments: In-reply-to Peter Eisentraut message dated "Wed, 18 Jan 2017 12:23:24 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <19772.1484761021.1@sss.pgh.pa.us> Date: Wed, 18 Jan 2017 12:37:01 -0500 Message-ID: <19773.1484761021@sss.pgh.pa.us> X-Pg-Spam-Score: -5.1 (-----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org Peter Eisentraut writes: > What's fishy about this is that I can't reproduce it locally in a > variety of VMs, and the buildfarm is not unanimous either. Well, as I said, I get $ locale -a | grep ^aa_ER aa_ER aa_ER.utf8 aa_ER.utf8@saaho aa_ER@saaho What it looks like to me is that we see "aa_ER.utf8@saaho", enter that, strip it to "aa_ER@saaho" and enter that (if_not_exists, which it doesn't), and then see "aa_ER@saaho" which we try to enter and fail. IOW, the behavior is dependent on the order in which "locale -a" returns the names, which I already mentioned I do not think we should trust to be consistent. The previous coding applied a sort so as not to depend on what order "locale -a" had returned things in, and I think we need to retain that. At the very least, all the normalized names need to be saved up and entered in a second pass. regards, tom lane -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers