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: Specifying column level collations
Date: Sat, 07 May 2011 13:19:10 +0200
Message-ID: <iq39rc$8sl$1@dough.gmane.org> (raw)

Hi,

I'm playing around with 9.1beta1 and would like to create a table where one column has a non-default collation.

But whatever I try, I can't find the correct name that I have to use.

My database is initialized as follows:

postgres=# select version();
                             version
----------------------------------------------------------------
  PostgreSQL 9.1beta1, compiled by Visual C++ build 1500, 32-bit
(1 row)

postgres=# select name, setting
postgres-# from pg_settings
postgres-# where name in ('lc_collate', 'server_encoding', 'client_encoding');
       name       |       setting
-----------------+---------------------
  client_encoding | WIN1252
  lc_collate      | German_Germany.1252
  server_encoding | UTF8
(3 rows)


Now I'm trying to create a table where one column's collation is set to french:

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?

And is there a command to show me all available collations that I can use?

Thanks
Thomas




view thread (5+ messages)  latest in thread

Message-ID: <iq39rc$8sl$1@dough.gmane.org>
Permalink:  ../iq39rc$8sl$1@dough.gmane.org/
Also on:    postgresql.org/message-id/iq39rc$8sl$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: <iq39rc$8sl$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