Re: Pass password in scripts?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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 01:35:01
Message-ID: 9996.1171503301@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"Neil Aggarwal" <neil(at)JAMMConsulting(dot)com> writes:
> With mysql, I can pass the password to the database in
> the command line call to the terminal client.

Really? That's an enormous security hole, because anyone running "ps"
on the system can see your password.

> Is there a way to do that with psql?

Consider using a ~/.pgpass file instead. Much safer.

regards, tom lane

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Neil Aggarwal 2007-02-15 01:55:24 Re: Pass password in scripts?
Previous Message Jan Danielsson 2007-02-15 01:31:31 Re: Pass password in scripts?