Mailing List Archive

How to change Postgres client encoding?
Hi,

I've always added 'db_query("SET NAMES 'Latin1'");' at the end of
db_connect() in dbpgsql.c to be able to use a unicode database with
dbmail (as described in
http://twister.fastxs.net/pipermail/dbmail-dev/2004-January/000569.html).

Unfortunately that breaks current cvs version, no other database queries
happen if I add that line. Could someone please give me a hint why?

The default since Postgres 7.3 are unicode databases. I don't like the
idea that I have to convert my Latin1 database at some point in the
future to unicode - and that will happen I think.

Without the SET NAMES patch the database has to be created with the
right locale:
CREATE DATABASE dbmail WITH OWNER=dbmail ENCODING='Latin1';
Maybe that should be added to the Readme?

Thanks.


Thomas
--
http://www.tmueller.com for pgp key (95702B3B)