From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | Bruce Momjian <pgman(at)candle(dot)pha(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-14 20:52:04 |
Message-ID: | 4246.1003092724@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Might as well use getpass() if available. My man page says "A getpass
> function appeared in Version 7 AT&T UNIX.", so it should be available on
> most systems.
Hmm. HPUX's man page for getpass says:
STANDARDS CONFORMANCE
getpass(): AES, SVID2, SVID3, XPG2, XPG3, XPG4
However, it also says:
getpass() reads up to a newline or EOF from the file /dev/tty, after
prompting on the standard error output with the null-terminated string
prompt and disabling echoing. A pointer is returned to a null-
terminated string of at most 8 characters. If /dev/tty cannot be
opened, a NULL pointer is returned.
The 8-char limit is alone sufficient to disqualify it for use in psql.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-10-14 22:07:54 | Re: Showing index details with \d on psql |
Previous Message | Peter Eisentraut | 2001-10-14 20:51:16 | Re: Showing index details with \d on psql |