Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cTsOa-0006ag-DS for pgsql-committers@arkaria.postgresql.org; Wed, 18 Jan 2017 15:43:32 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cTsOZ-0003vK-5m for pgsql-committers@arkaria.postgresql.org; Wed, 18 Jan 2017 15:43:31 +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 1cTsOL-0003gi-Lq for pgsql-committers@postgresql.org; Wed, 18 Jan 2017 15:43:17 +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 1cTsOI-0001Ev-BF for pgsql-committers@postgresql.org; Wed, 18 Jan 2017 15:43:16 +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 v0IFh7nH002084; Wed, 18 Jan 2017 10:43:08 -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: <26116.1484751196@sss.pgh.pa.us> References: <26116.1484751196@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Wed, 18 Jan 2017 09:53:16 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2082.1484754187.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 18 Jan 2017 10:43:07 -0500 Message-ID: <2083.1484754187@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 I wrote: > running bootstrap script ... ok > performing post-bootstrap initialization ... 2017-01-18 09:49:45.019 EST = [25919] FATAL: collation "aa_ER@saaho" for encoding "UTF8" already exists > 2017-01-18 09:49:45.019 EST [25919] STATEMENT: SELECT pg_import_system_c= ollations(if_not_exists =3D> false, schema =3D> 'pg_catalog'); As a stopgap so I could get some work done, I did - PG_CMD_PUTS("SELECT pg_import_system_collations(if_not_exists =3D> fals= e, schema =3D> 'pg_catalog');\n\n"); + PG_CMD_PUTS("SELECT pg_import_system_collations(if_not_exists =3D> true= , schema =3D> 'pg_catalog');\n\n"); and what I now see in pg_collation is regression=3D# select * from pg_collation where collname like 'aa_ER%'; collname | collnamespace | collowner | collencoding | collcollat= e | collctype=20=20=20=20=20 ------------------+---------------+-----------+--------------+-------------= -----+------------------ aa_ER | 11 | 10 | 6 | aa_ER = | aa_ER aa_ER.utf8 | 11 | 10 | 6 | aa_ER.utf8 = | aa_ER.utf8 aa_ER.utf8@saaho | 11 | 10 | 6 | aa_ER.utf8@s= aaho | aa_ER.utf8@saaho aa_ER@saaho | 11 | 10 | 6 | aa_ER.utf8@s= aaho | aa_ER.utf8@saaho (4 rows) Maybe an appropriate fix would be to ignore collations whose names aren't equal to what we get for collcollate/collctype. Presumably the latter are getting canonicalized somehow. regards, tom lane --=20 Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers