Passwords and batch processes (was Re: Problem with Dump) - Mailing list pgsql-admin

From David F. Skoll
Subject Passwords and batch processes (was Re: Problem with Dump)
Date
Msg-id Pine.LNX.4.44.0208231146100.2481-100000@shishi.roaringpenguin.com
Whole thread Raw
In response to Re: Problem with Dump  (Ian Barwick <barwick@gmx.net>)
Responses Re: Passwords and batch processes (was Re: Problem with Dump)  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: Passwords and batch processes (was Re: Problem with Dump)  (Ian Barwick <ian@barwick.de>)
List pgsql-admin
On Fri, 23 Aug 2002, Ian Barwick wrote:

> AFAIK utilities such as pg_dump prompt for the password but
> won't accept it as a command line option, which makes password-based
> authentication almost unusable when calling these utilities from a script.

This really should be Question #1 in the FAQ.

You can set the environment variable PGPASSWORD to the password, and avoid
prompts.  This assumes the same username/password has access to all the
databases for pg_dumpall.

I didn't find this documented anywhere.  It probably is, but somewhere
buried...

--
David.


pgsql-admin by date:

Previous
From: Ian Barwick
Date:
Subject: Re: Problem with Dump
Next
From: sonia sanchez diaz
Date:
Subject: Problems with array