Re: how can i change encoding in template1 DB?

From: Adrian Klaver <aklaver(at)comcast(dot)net>
To: pgsql-general(at)postgresql(dot)org
Cc: Nando67 <xxx(dot)yyy(at)zzz(dot)it>
Subject: Re: how can i change encoding in template1 DB?
Date: 2009-12-12 19:47:02
Message-ID: 200912121147.02438.aklaver@comcast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Saturday 12 December 2009 5:32:34 am Nando67 wrote:
> I installed postgresql by pacman (i'm using an ArchLinux Distr)
> the default encoding of template1 is SQL_ASCII, i want to change this
> one with UTF8 encoding
>
> i try to use ALTER DATABASE but this statemanent hasn't the clause
> encoding (while the CREATE DATABASE has it) so i can't modify the
> template1 db by this one.
>
> how can i do it?
>
> many thanks
>
> nando

First I would run the locale command.
Ex:
aklaver(at)tucker:~$ locale
LANG=en_US.UTF-8
LANGUAGE=en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Then I would read the Notes section of:
http://www.postgresql.org/docs/8.4/interactive/sql-createdatabase.html
There is a description of the various issues that can arise with the interaction
of database encoding and locale settings.

Then I would post here again to ask about your preferred db encoding and if it
is possible with the locale information from the first step.

--
Adrian Klaver
aklaver(at)comcast(dot)net

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Nando67 2009-12-12 20:54:05 Re: how can i change encoding in template1 DB?
Previous Message Scott Marlowe 2009-12-12 19:43:01 Re: how can i change encoding in template1 DB?