Re: prevent encoding conversion recursive error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu>, pgsql-patches(at)postgresql(dot)org, Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: prevent encoding conversion recursive error
Date: 2005-08-09 02:34:14
Message-ID: 11458.1123554854@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

I wrote:
> ...real problem is that gettext() has not been told the correct character
> set to convert messages to.

> ISTM we've seen this issue before and Peter had an idea how to fix it,
> but I forget the details. Peter?

A little bit of digging in the list archives located
http://archives.postgresql.org/pgsql-hackers/2003-11/msg01299.php
in which Peter opines

: - lc_collate and lc_ctype need to be held fixed in the entire cluster.
:
: - Gettext relies on iconv character set conversion, which relies on
: lc_ctype, which leads to a complete screw-up in the server because of
: the previous item.

which seems to fit with my observation: the message texts are being
converted to the cluster's original encoding rather than the encoding
that's active in the current database.

This does not look real easy to fix. Who's up for reimplementing
gettext and a few other pieces from scratch?

There is a separate line of thought here, which is that we are unlikely
ever to get this completely perfect, and so it'd be good if errors
during error processing didn't lead to recursion and PANIC. I don't
have an idea how to solve that one either.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-08-09 02:51:27 Re: prevent encoding conversion recursive error
Previous Message Tom Lane 2005-08-09 02:21:28 Re: prevent encoding conversion recursive error

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2005-08-09 02:51:27 Re: prevent encoding conversion recursive error
Previous Message Tom Lane 2005-08-09 02:21:28 Re: prevent encoding conversion recursive error