Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id CD1B24759C6 for ; Fri, 23 Aug 2002 13:20:31 -0400 (EDT) Received: from candle.pha.pa.us (216-55-132-35.dsl.san-diego.abac.net [216.55.132.35]) by postgresql.org (Postfix) with ESMTP id A23BA47597E for ; Fri, 23 Aug 2002 13:20:30 -0400 (EDT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id g7NHKDC11175; Fri, 23 Aug 2002 13:20:13 -0400 (EDT) From: Bruce Momjian Message-Id: <200208231720.g7NHKDC11175@candle.pha.pa.us> Subject: Re: Passwords and batch processes (was Re: Problem with Dump) In-Reply-To: To: "David F. Skoll" Date: Fri, 23 Aug 2002 13:20:13 -0400 (EDT) Cc: pgsql-admin@postgresql.org X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/287 X-Sequence-Number: 5401 7.3 will have a password file read from the user's home directory that will handle this; it can support multiple usernames in the same file. PGPASSWORD is documented, but in libpq, which is clearly not enough because something effects libpq by default is used by all the apps that use libpq, which is almost everything. --------------------------------------------------------------------------- David F. Skoll wrote: > 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. > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073