Bruce Momjian <pgman@candle.pha.pa.us> writes:
> The patch uses /dev/tty if it can open it, and stdin if it can't. It
> does not have a psql flag to force stdin because there is little reason
> to read a password from stdin in any reasonable usage.
If we are reading the password from /dev/tty not stdin, then IMHO the
prompt for the password should be sent to /dev/tty not stderr.
> In fact, I wonder if we should just fail if we need to prompt for a
> password and can't open /dev/tty. The function is simple_prompt() and
> if we can't open /dev/tty, maybe we should just assume the user typed
> nothing.
Would be okay with me ...
regards, tom lane