Re: psql without password prompt - Mailing list pgsql-novice

From Joshua b. Jore
Subject Re: psql without password prompt
Date
Msg-id Pine.BSO.4.44.0205291545460.13235-100000@kitten.greentechnologist.org
Whole thread Raw
In response to psql without password prompt  (Wei Weng <wweng@kencast.com>)
Responses Re: psql without password prompt  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-novice
Set the PGPASSWORD environment variable or supply it on STDIN. Your user
environment may be visible to other users so PGPASSWORD may not be secure.
I just don't mount /proc so I don't worry about that (I run OpenBSD which
doesn't require /proc like linux tends to). You may also consider sending
the password in on STDIN.

If that doesn't work then use a scripting language and don't use psql.

Joshua b. Jore ; http://www.greentechnologist.org ; 10012 11010 11022
10202 1012 2122 11020 10202 10202 11002 1020 1012 11102 11102 11102 1201
11001 11002 10211 11020 10202 10202 11002 11021 1201 11010 11020 10211

On 29 May 2002, Wei Weng wrote:

> I want to run a SQL script in my crontab job which requires using psql
> without having to input password every time. I am running postgresql
> 7.2.
>
> What is the trick?
>
> Thank you.
>
>
>
> --
> Wei Weng
> Network Software Engineer
> KenCast Inc.
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>


pgsql-novice by date:

Previous
From: Wei Weng
Date:
Subject: psql without password prompt
Next
From: James Kelty
Date:
Subject: CPU types and queries...