Re: [PATCH] (Windows) psql echoes password when reading from pipe
Matthew Stickney <mtstickney@gmail.com>
From: Matthew Stickney <mtstickney@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2018-05-23T19:29:29Z
Lists: pgsql-hackers
Attachments
- 0002-Disable-input-echo-on-the-console-not-stdin.patch (text/plain) patch 0002
The attached is a patch that uses the _fileno/_get_osfhandle approach. This doesn't address the stdin fallback, or error handling if opening termin fails; however, it should be no worse than what's there now, and it fixes the immediate problem. I'm still thinking about the fallback in terms of a mintty-type environment, but I wanted to get this patch out there in the meantime. -Matt Stickney
Commits
-
Fix simple_prompt() to disable echo on Windows when stdin != terminal.
- bed74e9d4959 10.5 landed
- bbaf75ee0c3a 9.6.10 landed
- 50485b3e201d 11.0 landed
- 3466b0202cd6 9.3.24 landed
- 09fb2d5d3b8f 9.4.19 landed
- 085791b8aace 9.5.14 landed