Re: psql: default base and password reading

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Adam Osuchowski <adwol(at)polsl(dot)gliwice(dot)pl>, pgsql-patches(at)postgresql(dot)org
Subject: Re: psql: default base and password reading
Date: 2001-10-13 19:39:39
Message-ID: 200110131939.f9DJddN07462@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

> Tom Lane writes:
>
> > > 2. Password is reading from terminal (/dev/tty) rather than from
> > > stdin.
> >
> > Hmm, that might be a good idea. Comments anyone?
>
> I guarantee you that within 24 hours after such a patch were checked in
> someone's going to complain that he has no /dev/tty.
>
> Meanwhile, there are a couple of possible workarounds:
>
> * PGPASSWORD environment variable.
>
> * FIFOs
>
> * (echo "Password"; pipe_input) | psql
>
> A generalized option to read the password from any file might make sense,
> though.

Have you seen my later version that reads from stdin/stderr if /dev/tty
doesn't open. How is that?

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Serguei Mokhov 2001-10-13 19:46:30 Re: PG_DUMP NLS (Russian)
Previous Message Peter Eisentraut 2001-10-13 19:23:10 Re: Showing index details with \d on psql