Skip site navigation (1) Skip section navigation (2)

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-15 00:22:01
Message-ID: 200110150022.f9F0M1U25028@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
> Bruce Momjian writes:
> 
> > Have you seen my later version that reads from stdin/stderr if /dev/tty
> > doesn't open.  How is that?
> 
> 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.
> 
> However, I'm afraid many users have set up their systems to read the
> password from stdin, so that should probably stay the default unless we
> take a user poll.

Vote request sent to 'general'.

Yes, a change will inconvenience some people and perhaps they will have
to resort to 'expect'.  However, I can't think of one piece of
significant software that reads from stdin by default rather than
/dev/tty.  It certainly makes this counter-intuitive:

	cat script | psql test

If 'test' requires a password, our current code requires the password to
be the first line in the script.  Though this can be convenient in some
cases, in most cases it is quite unexpected.


-- 
  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

pgsql-patches by date

Next:From: Tatsuo IshiiDate: 2001-10-15 01:26:19
Subject: Re: [PATCHES] Unicode combining characters
Previous:From: Bruce MomjianDate: 2001-10-14 23:07:36
Subject: Re: psql: default base and password reading

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group