Setting environment variables for PostgreSQL

Andreas Tille tillea at rki.de
Tue Feb 20 15:17:33 CET 2007


[To Federico: For the beginning of this thread please see:
   http://lists.alioth.debian.org/pipermail/pkg-zope-developers/2007-February/002948.html ]

Any other ideas?  I'm a little bit under presure because I have
to replace a server and do not want to keep the old 7.4 PostgreSQL
server just for some stupid German Umlauts that scramble the resulting
web pages.

Kind regards and many thanks for any fruitful idea

           Andreas.

On Mon, 19 Feb 2007, Andreas Tille wrote:

> On Mon, 19 Feb 2007, Fabio Tranchitella wrote:
>
>> I know that it is quite inelegant, but you could try to add the:
>> 
>>  export PGCLIENTENCODING=LATIN1
>> 
>> to the file:
>> 
>>  /var/lib/zope2.X/instance/$INSTANCE/bin/zopectl
>
> I tried - but no change. :-(
>
>>> which works perfectly if I use psql as client.  So I tried
>>> both
>>> 
>>>    1. Adding
>>>          export PGCLIENTENCODING=LATIN1
>>>       on top of /etc/init.d/zope2.9 and
>> 
>> This should work, indeed. I'll investigate further...
>
> I thought that it "should" work as well, but ...
>
>>>    2. adding
>>>          PGCLIENTENCODING=LATIN1
>>>       to /etc/default/zope2.9
>> 
>> This is not supported, as the default file is just used for a few
>> variables but the content is not exported.
>
> No problem - I just wanted to try something else ...
>
>>> BTW, I tried to set the encoding directly in the
>>>      Z Psycopg Database Connection
>>> object, as 'LATIN1' without any success as well
>> 
>> This should work and it should be the right approach. What about psycopg2
>> and ZPsycopg2DA? Do they work for this use case?
>
> I did
>
>   $ sudo aptitude install zope-psycopgda2
>   $ sudo aptitude purge zope-psycopgda     # no need to have both of them
>   $ sudo dzhandle add-product default ZPsycopgDA
>     # beeing a little bit unsure whether I should prefer
>     #   sudo dzhandle add-product default ZPsycopgDA:2
>     # and what the difference might be
>   $ sudo /etc/init.d/zope2.9 restart
>
> Nothing changed.  I verified the "Z Psycopg 2 Database Connection"
> and reallized that there is not even a property like "Backend encoding"
> as it was in psycopg (1.x) - so I see no chance to fix it this way.
>
> Any further idea?
>
> Kind regards
>
>         Andreas.
>
> -- 
> http://fam-tille.de
>
> _______________________________________________
> pkg-zope-developers mailing list
> pkg-zope-developers at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/pkg-zope-developers
>
>

-- 
http://fam-tille.de



More information about the pkg-zope-developers mailing list