pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-sql@postgresql.org
Subject: Re: Specifying column level collations
Date: Sat, 07 May 2011 14:16:35 +0200
Message-ID: <iq3d70$o79$1@dough.gmane.org> (raw)
In-Reply-To: <4DC534E1.40801@lelarge.info>
References: <iq39rc$8sl$1@dough.gmane.org>
	<4DC534E1.40801@lelarge.info>

Guillaume Lelarge wrote on 07.05.2011 14:02:
>> create table foo (bar text collate "fr_FR")  -->   collation "fr_FR" for
>> encoding "UTF8" does not exist
>> create table foo (bar text collate "fr_FR.1252")  -->   collation "fr_FR"
>> for encoding "UTF8" does not exist
>> create table foo (bar text collate "fr_FR.UTF8")  -->   collation "fr_FR"
>> for encoding "UTF8" does not exist
>> create table foo (bar text collate "French_France.1252") -->  collation
>> "French_France.1252" for encoding "UTF8" does not exist
>>
>> So, how do I specify the collation there?
>>
>
> You first need to use "CREATE COLLATION", such as:
>
> b1=# CREATE COLLATION fr (locale='fr_FR');
> CREATE COLLATION
>

Thanks for the quick answer.

It seems there is something missing with my installation:

postgres=# CREATE COLLATION fr (locale='fr_FR');
ERROR:  could not create locale "fr_FR": No such file or directory

I used the ZIP distribution from EnterpriseDB (not the installer) so maybe the support for collations is simply not included with the "plain" binaries.

postgres=# select * from pg_collation;
  collname | collnamespace | collowner | collencoding | collcollate | collctype
----------+---------------+-----------+--------------+-------------+-----------
  default  |            11 |        10 |           -1 |             |
  C        |            11 |        10 |           -1 | C           | C
  POSIX    |            11 |        10 |           -1 | POSIX       | POSIX
(3 rows)


Regards
Thomas




view thread (5+ messages)  latest in thread

Message-ID: <iq3d70$o79$1@dough.gmane.org>
Permalink:  ../iq3d70$o79$1@dough.gmane.org/
Also on:    postgresql.org/message-id/iq3d70$o79$1@dough.gmane.org

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: spam_eater@gmx.net
  Subject: Re: Specifying column level collations
  In-Reply-To: <iq3d70$o79$1@dough.gmane.org>

* 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