Re: How do I change the server encoding? SOLVED

From: Joseph Shraibman <jks(at)selectacast(dot)net>
To: Joseph Shraibman <jks(at)selectacast(dot)net>
Subject: Re: How do I change the server encoding? SOLVED
Date: 2003-02-26 22:11:18
Message-ID: 3E5D3B86.3000105@selectacast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Joseph Shraibman wrote:
> Joseph Shraibman wrote:
> After further experimenting I think the problem is in psql. When I try
> update mytable set firstname = 'Oné' where ukey = 12911;
>
> It works with a latin1 database, but when I try it on a unicode database:
>
> utfowl=# update mytable set firstname = 'Oné' where ukey = 12911;
> utfowl'#
>
> It thinks there is an open quote or something. This is even if I set
> the client encoding to be latin1. Of course dumps are read with the
> copy command but maybe it is the same problem.
>
I solved the problem. "set client_encoding = 'latin1';" does not work, but "\encoding
latin1" does. I suggest that pg_dump put a "\encoding <encoding>" after every \connect
in the dump. I would do this myself but I can't figure out where that is done in the dump
program.

I did modify pg_dump.c so the encoding used during the dump can be specified on the
command line, but since that isn't what solved the problem I'm not sure there is a point
to having it. Is anyone interested?

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2003-02-26 22:17:36 Re: index usage (and foreign keys/triggers)
Previous Message Murthy Kambhampaty 2003-02-26 21:51:13 Dump/restoring a given table in a given schema

Browse pgsql-hackers by date

  From Date Subject
Next Message James H. Cloos Jr. 2003-02-26 22:33:23 ecpg in REL7_3_2
Previous Message Tom Lane 2003-02-26 22:09:49 Re: Hey! I thought this was fixed in 7.2.4