From: Noah Misch <noah@leadboat.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alexander Law <exclusion@gmail.com>
Cc: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Pg Bugs <pgsql-bugs@postgresql.org>
Subject: Re: BUG #6510: A simple prompt is displayed using wrong charset
Date: Mon, 15 Oct 2012 05:48:18 -0400
Message-ID: <20121015094818.GB4627@tornado.leadboat.com> (raw)
In-Reply-To: <26179.1350231042@sss.pgh.pa.us>
References: <E1S3twb-0004OY-4g@wrigleys.postgresql.org>
<1331925178-sup-9261@alvh.no-ip.org>
<4F65A533.7090208@gmail.com>
<1332187409-sup-4631@alvh.no-ip.org>
<4F68DF76.1030609@gmail.com>
<20121010110555.GA21405@tornado.leadboat.com>
<507A5D18.3080107@gmail.com>
<26179.1350231042@sss.pgh.pa.us>
On Sun, Oct 14, 2012 at 12:10:42PM -0400, Tom Lane wrote:
> Alexander Law <exclusion@gmail.com> writes:
>
> > +#ifdef WIN32
> > + termin = fopen("CONIN$", "r");
> > + termout = fopen("CONOUT$", "w+");
> > +#else
> > termin = fopen(DEVTTY, "r");
> > termout = fopen(DEVTTY, "w");
> > +#endif
> > if (!termin || !termout
>
> My immediate reaction to this patch is "that's a horrible kluge, why
> shouldn't we change the definition of DEVTTY instead?"
You could make DEVTTY_IN, DEVTTY_IN_MODE, DEVTTY_OUT and DEVTTY_OUT_MODE to
capture all the differences. That doesn't strike me as an improvement, and no
other function would use them at present. As I explained in my reply to
Alexander, we should instead remove DEVTTY.
> Is there a
> similar issue in other places where we use DEVTTY?
Yes. However, the other use of DEVTTY arises only with readline support, not
typical of native Windows builds.
> Also, why did you change the termout output mode, is that important
> or just randomness?
It's essential:
http://archives.postgresql.org/message-id/20121010110555.GA21405@tornado.leadboat.com
nm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: noah@leadboat.com, tgl@sss.pgh.pa.us, exclusion@gmail.com, alvherre@commandprompt.com
Subject: Re: BUG #6510: A simple prompt is displayed using wrong charset
In-Reply-To: <20121015094818.GB4627@tornado.leadboat.com>
References: <E1S3twb-0004OY-4g@wrigleys.postgresql.org> <1331925178-sup-9261@alvh.no-ip.org> <4F65A533.7090208@gmail.com> <1332187409-sup-4631@alvh.no-ip.org> <4F68DF76.1030609@gmail.com> <20121010110555.GA21405@tornado.leadboat.com> <507A5D18.3080107@gmail.com> <26179.1350231042@sss.pgh.pa.us> <20121015094818.GB4627@tornado.leadboat.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox