Neil Aggarwal wrote:
> When I try that, I get:
>
> /usr/local/pgsql/bin/psql: option `--password' doesn't allow an argument
>
>> Is there a way to do that with psql?
>
> You mean like:
> $ psql --user=foobar --password=boofar < script.sql
Silly me -- I read the manual page too fast. --password or -W doesn't
take an argument. It just tells the client that you want to enter a
password. This makes since, since passing a password is bad for security.
I guess you're stuck using .pgpass, which is a better solution anyway.
--
Kind regards,
Jan Danielsson