Re: LATIN2->UTF8 conversation with dblink - Mailing list pgsql-novice

From Tom Lane
Subject Re: LATIN2->UTF8 conversation with dblink
Date
Msg-id 23494.1233599514@sss.pgh.pa.us
Whole thread Raw
In response to LATIN2->UTF8 conversation with dblink  (Ruzsinszky Attila <ruzsinszky.attila@gmail.com>)
Responses Re: LATIN2->UTF8 conversation with dblink
Re: LATIN2->UTF8 conversation with dblink
List pgsql-novice
Ruzsinszky Attila <ruzsinszky.attila@gmail.com> writes:
> The situation:
> We've got two machines. The source database (DB) is running on an RHEL
> 5.x machine
> with PSQL 8.1.11. The destination DB is running on SuSE 11.0 with PSQL 8.3.x.
> The mechines are relative far away each other and there is a 2Mbps WAN
> line between them.

> The DB is the same except the character coding. Source is LATIN2 and
> the target DB is UTF8.
> We wrote a trigger to copy the data from source to target with dblink.
> The problem is the
> different DB character coding! PGSQL complains about wrong byte order.

Hmm.  You can presumably fix this by setting client_encoding in the
dblink connection to match the encoding in use in the database it's
called in.  But I wonder why dblink doesn't just do that for you
automatically.

            regards, tom lane

pgsql-novice by date:

Previous
From: Ruzsinszky Attila
Date:
Subject: LATIN2->UTF8 conversation with dblink
Next
From: ries van Twisk
Date:
Subject: Re: LATIN2->UTF8 conversation with dblink