Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-novice by date

Next:From: Neil AggarwalDate: 2007-02-15 01:55:24
Subject: Re: Pass password in scripts?
Previous:From: Jan DanielssonDate: 2007-02-15 01:31:31
Subject: Re: Pass password in scripts?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group