What is the correct collation for PostgreSQL database that can be used in different languages?

I have a database created:

-- Database: adatabase

-- DROP DATABASE adatabase;

CREATE DATABASE adatabase
  WITH OWNER = adatabaseowner
       ENCODING = 'SQL_ASCII'
       TABLESPACE = pg_default
       LC_COLLATE = 'C'
       LC_CTYPE = 'C'
       CONNECTION LIMIT = -1;

      

These appear to be the default settings in my PostgreSQL 8.4 installation, which appear to be based on the default standard set for my Ubuntu installation.

What are the appropriate settings that I should use if I want to make the system multilingual in the future?

+3


source to share


1 answer


You should at least use UTF-8 for encoding. With SQL_ASCII, you cannot store non-English characters (e.g. French accented characters, German umlauts).



If you are upgrading to 9.1, the mapping can be defined on the fly either in a query ( ORDER BY ... COLLATE ...

) or in a column.

+2


source







All Articles