Re: Client Messages

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Client Messages
Дата
Msg-id 4484.1327591916@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Client Messages  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Ответы Re: Client Messages  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Список pgsql-hackers
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> The thing is, there's currently no encoding conversion happening, so if 
> you have one database in LATIN1 encoding and another in UTF-8, for 
> example, whatever you put in your postgresql.conf is going to be wrong 
> for one database. I'm happy to just document the issue for per-database 
> messages, "ALTER DATABASE ... SET welcome_message", the encoding used 
> there need to match the encoding of the database, or it's displayed as 
> garbage. But what about per-user messages, when the user has access to 
> several databases, or postgresql.conf?

I've not looked at the patch, but what exactly will happen if the string
has the wrong encoding?

The idea that occurs to me is to have the code that uses the GUC do a
verify_mbstr(noerror) on it, and silently ignore it if it doesn't pass
(maybe with a LOG message).  This would have to be documented of course,
but it seems better than the potential consequences of trying to send a
wrongly-encoded string.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Abhijit Menon-Sen
Дата:
Сообщение: Re: proposal: better support for debugging of overloaded functions
Следующее
От: Abhijit Menon-Sen
Дата:
Сообщение: Re: PL/Python result metadata