Re: How do I change the server encoding? SOLVED - Mailing list pgsql-general

From Joseph Shraibman
Subject Re: How do I change the server encoding? SOLVED
Date
Msg-id 3E5D3B86.3000105@selectacast.net
Whole thread Raw
In response to Re: How do I change the server encoding?  (Joseph Shraibman <jks@selectacast.net>)
List pgsql-general
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?


pgsql-general by date:

Previous
From: "Andrew Bartley"
Date:
Subject: Re: WITHOUT OIDS
Next
From: Stephan Szabo
Date:
Subject: Re: index usage (and foreign keys/triggers)