From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dario V. Fassi <software@sistemat.com.ar>
Cc: pgsql-jdbc@postgresql.org
Cc: pgsql-admin@postgresql.org
Subject: Re: Migrate postgres databases from SQL_ASCII to UNICODE encoding
Date: Sat, 17 Jul 2004 17:18:16 -0400
Message-ID: <16994.1090099096@sss.pgh.pa.us> (raw)
In-Reply-To: <40F98613.1060405@sistemat.com.ar>
References: <40F98613.1060405@sistemat.com.ar>
"Dario V. Fassi" <software@sistemat.com.ar> writes:
> A simple question, we need to migrate many (>20) postgres databases from
> SQL_ASCII encoding to UNICODE encoding, over a 7.3.6 server.
SQL_ASCII is not an encoding (it's more like the absence of knowledge
about an encoding). What is the data actually stored as?
> With Dump/Restore , we get an error (Invalid Unicode) in any field that
> has a 8 bits character coming from the SQL_ASCII , even setting the
> client_encoding to WIN, ISO-8859-1, and others encodings.
It might work to just UPDATE pg_database to set datencoding to the
correct value reflecting what you have actually stored. You might then
need to REINDEX any indexes on textual columns, but I don't think
anything else would go wrong.
If you have a mishmash of different encodings in a single database, then
of course there is no simple solution; you are in for some pain while
you try to fix the data.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, software@sistemat.com.ar, pgsql-jdbc@postgresql.org, pgsql-admin@postgresql.org
Subject: Re: Migrate postgres databases from SQL_ASCII to UNICODE encoding
In-Reply-To: <16994.1090099096@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox