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

Re: FW: [ppa-dev] Severe bug in debian - phppgadmin opens

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Lincoln Yeoh <lyeoh(at)pop(dot)jaring(dot)my>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: FW: [ppa-dev] Severe bug in debian - phppgadmin opens
Date: 2001-11-28 18:50:29
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> >> Is there a safe way to send username and password to psql?
> > The standard way I know of is to use 'expect' and wrap your psql call
> > around that.
> Didn't you break that by making psql read the password from /dev/tty?
> Or can 'expect' take control of /dev/tty?

Expect communicates with the process via pseudo-ttys, so it works fine. 
Also, if it can't read /dev/tty, it will read from stdin.  At least that
is that standard way to do it.

getpass() docs said:

     The getpass() function displays a prompt to, and reads in a password
     from, /dev/tty. If this file is not accessible, getpass displays the
     prompt on the standard error output and reads from the standard input.

  Bruce Momjian                        |
  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-hackers by date

Next:From: Luis AmigoDate: 2001-11-28 19:01:30
Subject: Re: Call for platform testing
Previous:From: Bruce MomjianDate: 2001-11-28 18:48:37
Subject: Re: FW: [ppa-dev] Severe bug in debian - phppgadmin opens

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