Re: Pass password in scripts?

From: Jan Danielsson <jan(dot)m(dot)danielsson(at)gmail(dot)com>
To: Neil Aggarwal <neil(at)JAMMConsulting(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Pass password in scripts?
Date: 2007-02-15 02:53:17
Message-ID: 45D3CB1D.6030801@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Tim Bowden 2007-02-15 06:26:06 Re: install on ubuntu
Previous Message Neil Aggarwal 2007-02-15 02:17:30 Re: Pass password in scripts?