PostgreSQL and pgaccess problems

Ron Peterson ron.peterson at yellowbank.com
Tue May 28 20:22:14 EDT 2002


On Tue, May 28, 2002 at 04:17:31PM -0400, Derek Atkins wrote:

> I believe this is a locale issue, where the server and client
> are in different 'Postgres' locales.  Unfortunately I don't know
> how to fix this.  You might try manually setting the appropriate
> env. vars.

You can view the current locale encoding for your PostgreSQL databases
by issuing 'psql -l'.  The database encoding(s) are likely assuming the
default encoding for your installation (which can be set using the -E
option to initdb).  You can override the default encoding when creating
new databases by doing CREATE DATABASE ... WITH ENCODING ...

I'm going to guess that your database encoding on the server side is
UNICODE, and your client encoding is set to SQL_ASCII.  I say that,
because if it were the other way around, I believe the tranlation would
work o.k.  AFAIK, UNICODE cannot be converted to SQL_ASCII on the client
side.

The client side encoding can be set using the \encoding option to
psql.  Alternatively, you can use the PGCLIENTENCODING environment
variable.  Whether this variable pertains to your pgaccess setup, I'm
not sure.

-- 
Ron Peterson                   -o)
87 Taylor Street               /\\
Granby, MA  01033             _\_v
https://www.yellowbank.com/   ---- 



More information about the Discuss mailing list