overwrite the encoding of a database

Started by Massa, Harald Arminover 16 years ago2 messagesgeneral
Jump to latest

Hello,

I have an old PostgreSQL Database which was created with encoding =
SQL_ASCII. That is an old sin of mine; 9years ago I did not know better.

Now I know better than to use SQL_ASCII.

On the bright side: I am totally sure that the TEXT within that database is
in WIN1252 / CP1252 encoding.

Is there any way to overwrite the encoding-information? something like
"udpate <specialsystemcatalog> set pg_encodingcol='xxx' where
databasename='oldsin';

Best wishes,

Harald

--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Spielberger Straße 49
70435 Stuttgart
0173/9409607
no fx, no carrier pigeon
-
LASIK good, steroids bad?

#2Andres Freund
andres@anarazel.de
In reply to: Massa, Harald Armin (#1)
Re: overwrite the encoding of a database

On Thursday 16 July 2009 10:53:37 Massa, Harald Armin wrote:

Hello,

I have an old PostgreSQL Database which was created with encoding =
SQL_ASCII. That is an old sin of mine; 9years ago I did not know better.

Now I know better than to use SQL_ASCII.

On the bright side: I am totally sure that the TEXT within that database is
in WIN1252 / CP1252 encoding.

Is there any way to overwrite the encoding-information? something like
"udpate <specialsystemcatalog> set pg_encodingcol='xxx' where
databasename='oldsin';

Would a dump+reload work?

Andres