Re: BUG #7493: Postmaster messages unreadable in a Windows console

From: Alexander Law <exclusion(at)gmail(dot)com>
To: Noah Misch <noah(at)leadboat(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Magnus Hagander <magnus(at)hagander(dot)net>, Andrew Dunstan <andrew(at)dunslane(dot)net>
Subject: Re: BUG #7493: Postmaster messages unreadable in a Windows console
Date: 2013-02-20 12:00:00
Message-ID: 5124BAC0.4060006@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-general pgsql-hackers

Hello,

15.02.2013 02:59, Noah Misch wrote:
>>> With your proposed change, the problem will resurface in an actual SQL_ASCII
>>> database. At the problem's root is write_console()'s assumption that messages
>>> are in the database encoding. pg_bind_textdomain_codeset() tries to make that
>>> so, but it only works for encodings with a pg_enc2gettext_tbl entry. That
>>> excludes SQL_ASCII, MULE_INTERNAL, and others. write_console() needs to
>>> behave differently in such cases.
>> Thank you for the notice. So it seems that "DatabaseEncoding" variable
>> alone can't present a database encoding (for communication with a
>> client) and current process messages encoding (for logging messages) at
>> once. There should be another variable, something like
>> CurrentProcessEncoding, that will be set to OS encoding at start and can
>> be changed to encoding of a connected database (if
>> bind_textdomain_codeset succeeded).
> I'd call it MessageEncoding unless it corresponds with similar rigor to a
> broader concept.
Please look at the next version of the patch.

Thanks,
Alexander

Attachment Content-Type Size
0001-Fix-postmaster-messages-encoding.patch text/x-patch 3.7 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Claude Speed 2013-02-20 13:42:22 new BUG: "postgresql 9.2.3: very long query time"
Previous Message Sandeep Thakkar 2013-02-20 08:58:06 Re: Automated start of the service under Windows 7

Browse pgsql-general by date

  From Date Subject
Next Message Vincent Veyron 2013-02-20 15:13:35 Re: Perl function leading to out of memory error
Previous Message NiRE 2013-02-20 03:04:44 PostgreSQL took over my login

Browse pgsql-hackers by date

  From Date Subject
Next Message Shigeru Hanada 2013-02-20 12:26:50 Re: FDW for PostgreSQL
Previous Message Etsuro Fujita 2013-02-20 11:55:03 Re: Review : Add hooks for pre- and post-processor executables for COPY and \copy