Alexander Pucher writes:
> In MySQL, I did it like this:
>
> 'mysql -u user -ppassword < script.sh'
Then you might as well not have any authentication at all, because every
user on your system can then read the password off the "ps" output.
> My problem is that I can't find a way to put the password in an 'psql'
> statement at the prompt.
You can put it into the environment variable PGPASSWORD, but that *might*
suffer from the same problems depending on your OS. If you want real
noninteractive login you will have to use a different authentication
method, such as ident.
--
Peter Eisentraut peter_e@gmx.net