Lincoln Yeoh <lyeoh@pop.jaring.my> writes:
> At 01:08 AM 11/28/01 -0500, Tom Lane wrote:
>> ... Password auth sucks from a convenience point of view
>> (or even from a possibility point of view, for scripts; don't forget
>> the changes that you yourself recently applied to guarantee that a
>> script *cannot* supply a password to psql).
> Ack. We can't send in passwords to psql anymore? :(
Well, Bruce, you were the one that was hot to make that /dev/tty change.
Time to defend it.
> Is there a safe way to send username and password to psql?
If you want to put those things in a script, you could still do
export PGUSER=whateverexport PGPASSWORD=whateverpsql ...
This would actually work a lot better than other ways for cases such
as doing pg_dumpall, where you'd otherwise need to supply the password
multiple times.
regards, tom lane