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

Re: psql without password prompt

From: "Joshua b(dot) Jore" <josh(at)greentechnologist(dot)org>
To: Wei Weng <wweng(at)kencast(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: psql without password prompt
Date: 2002-05-29 20:48:55
Message-ID: Pine.BSO.4.44.0205291545460.13235-100000@kitten.greentechnologist.org (view raw or flat)
Thread:
Lists: 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
>


In response to

Responses

pgsql-novice by date

Next:From: James KeltyDate: 2002-05-29 21:00:33
Subject: CPU types and queries...
Previous:From: James KeltyDate: 2002-05-29 20:07:28
Subject: CPU types and queries...

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