pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: pgsql-committers@postgresql.org
Subject: Re: pgsql: Add function to import operating system collations
Date: Wed, 18 Jan 2017 10:43:07 -0500
Message-ID: <2083.1484754187@sss.pgh.pa.us> (raw)
In-Reply-To: <26116.1484751196@sss.pgh.pa.us>
References: <E1cTrLM-0008E8-6K@gemulon.postgresql.org>
	<26116.1484751196@sss.pgh.pa.us>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

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_collations(if_not_exists => false, schema => '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 => false, schema => 'pg_catalog');\n\n");
+   PG_CMD_PUTS("SELECT pg_import_system_collations(if_not_exists => true, schema => 'pg_catalog');\n\n");

and what I now see in pg_collation is

regression=# select * from pg_collation where collname like 'aa_ER%';
     collname     | collnamespace | collowner | collencoding |   collcollate    |    collctype     
------------------+---------------+-----------+--------------+------------------+------------------
 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@saaho | aa_ER.utf8@saaho
 aa_ER@saaho      |            11 |        10 |            6 | aa_ER.utf8@saaho | 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


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers



view thread (24+ messages)  latest in thread

Message-ID: <2083.1484754187@sss.pgh.pa.us>
Permalink:  ../2083.1484754187@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2083.1484754187@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, peter_e@gmx.net
  Subject: Re: pgsql: Add function to import operating system collations
  In-Reply-To: <2083.1484754187@sss.pgh.pa.us>
  References: <E1cTrLM-0008E8-6K@gemulon.postgresql.org> <26116.1484751196@sss.pgh.pa.us> <2083.1484754187@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox