HiveBrain v1.2.0
Get Started
← Back to all entries
snippetsqlMinor

How to install UTF8 locale on PostgreSQL?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
postgresqlinstallutf8localehow

Problem

I have a PostgreSQL 8.4 on Windows 7 machine, and my issue is that I have only the win1251 locale.

So when I create a database, I choose the UTF8 encoding and can select only lc_collate = Russian_Russia.Win1251. And when I get any errors when I use JDBC I get unreadable logs.

How can I set a locale like en_US.UTF8 or ru_RU.UTF8?

Solution

PostgreSQL 8.4 supports only one locales that is selected in installation time. You need to rerun initdb statement with different locales (but only one can be used) or you can migrate to 9.x version, that supports more locales.

Context

StackExchange Database Administrators Q#49495, answer score: 2

Revisions (0)

No revisions yet.