pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: emanuel.calvo@2ndquadrant.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #10255: CREATE COLLATION bug on 9.4
Date: Wed, 07 May 2014 12:43:46 -0400
Message-ID: <30276.1399481026@sss.pgh.pa.us> (raw)
In-Reply-To: <20140507155918.1397.98656@wrigleys.postgresql.org>
References: <20140507155918.1397.98656@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

emanuel.calvo@2ndquadrant.com writes:
> When trying to create COLLATIONS, I'm facing some issues:

I see no bugs here, just misunderstanding of the commands.

> postgres=# CREATE COLLATION le_english (LOCALE = "en_US.utf8");
> ERROR:  encoding "LATIN1" does not match locale "en_US.utf8"
> DETAIL:  The chosen LC_CTYPE setting requires encoding "UTF8".

Your current database is using encoding LATIN1, so you need to reference
a locale that matches that, perhaps "en_US.iso88591".  (Hard to be sure
about the exact spelling, since you didn't provide your platform.)

> postgres=# CREATE COLLATION le_english (LOCALE = "en_US.utf8", LC_CTYPE =
> "UTF8");
> ERROR:  conflicting or redundant options

You specify either locale or lc_ctype+lc_collate, not both.

> postgres=# CREATE COLLATION le_english (LC_COLLATE = "UTF8", LC_CTYPE =
> "UTF8");
> ERROR:  could not create locale "UTF8": Success

I get this (on RHEL6):

l1=# CREATE COLLATION le_english (LC_COLLATE = "UTF8", LC_CTYPE = "UTF8");
ERROR:  could not create locale "UTF8": No such file or directory
DETAIL:  The operating system could not find any locale data for the locale name "UTF8".

which is what I'd expect, since it seems unlikely that any platform
would name a locale setting just "UTF8".

What seems likely is that there's something bogus about the locale data on
your machine.  Or maybe there's a platform-specific issue in how PG is
interrogating that data ... but since you did not provide your platform
information, we have no way to investigate that.

			regards, tom lane


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



view thread (6+ messages)  latest in thread

Message-ID: <30276.1399481026@sss.pgh.pa.us>
Permalink:  ../30276.1399481026@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/30276.1399481026@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-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, emanuel.calvo@2ndquadrant.com
  Subject: Re: BUG #10255: CREATE COLLATION bug on 9.4
  In-Reply-To: <30276.1399481026@sss.pgh.pa.us>
  References: <20140507155918.1397.98656@wrigleys.postgresql.org> <30276.1399481026@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