Thread: Help in postgre Charset

Help in postgre Charset

From
"Ronney M. de Castro"
Date:
Dear Support,
 
My name is Rooney and I am a Systems Analyst in the City of Juiz de Fora - Brazil (State: Minas Gerais) and I have a problem here with the database charset Postgre. My installation of Postgres uses "LATIN1" and I need to create a new database whitch use "UTF-8" in the same facility. Is it possible? Create different databases, the witch uses diferents charsets in a same installation of Potsgre?
Thanks

Ronney
 

Re: Help in postgre Charset

From
Dave Page
Date:
On Thu, Jun 30, 2011 at 2:08 PM, Ronney M. de Castro
<ronney@pjf.mg.gov.br> wrote:
> Dear Support,
>
> My name is Rooney and I am a Systems Analyst in the City of Juiz de Fora -
> Brazil (State: Minas Gerais) and I have a problem here with the database
> charset Postgre. My installation of Postgres uses "LATIN1" and I need to
> create a new database whitch use "UTF-8" in the same facility. Is it
> possible? Create different databases, the witch uses diferents charsets in a
> same installation of Potsgre?

Yes, you can do that if you use template0 as the template when you
create the database.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: Help in postgre Charset

From
Dave Page
Date:
[Please keep the mailing list CC'd]

On Thu, Jun 30, 2011 at 2:34 PM, Ronney M. de Castro
<ronney@pjf.mg.gov.br> wrote:
> Hello Dave,
>
> I tried to create the database using UTF-8 here and templat0 but an error
> occurred. See attached.
> Note: my instalation of postgre is LATIN 1 and i need to create a UTF-8 in
> this instalation.

What version of PostgreSQL is this?


-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: Help in postgre Charset

From
Dave Page
Date:
[Please CC the list, or I will be unable to provide any help]

On Thu, Jun 30, 2011 at 2:55 PM, Ronney M. de Castro
<ronney@pjf.mg.gov.br> wrote:
> The version is 8.4.

Does your server have a pt_BR.UTF8 locale installed? Assuming it's a
Unix box, locale -a should list what's available.

If so, do you get the same error if you manually execute the SQL query:

CREATE DATABASE foo ENCODING 'UTF8' TEMPLATE template0;

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company