Re: How to automate password requests?

From: Alan Hodgson <ahodgson(at)simkin(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How to automate password requests?
Date: 2007-11-28 18:46:43
Message-ID: 200711281046.43395@hal.medialogik.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wednesday 28 November 2007, Marten Lehmann <lehmann(at)cnm(dot)de> wrote:
> Hello,
>
> I'm trying to automate some postgresql scripts, but I cannot find a way
> to pass a password directly to commands like pg_dump psql and so on.
> Even a
>
> echo "password" | psql
>
> doesn't work, the password prompt of psql is still waiting.
>
> mysql has the -p option. What would be the postgresql equivalent? I
> don't want to enter passwords dozend times.
>

create a .pgpass file.

--
The global consumer economy can best be described as the most efficient way
to convert natural resources into waste.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gauthier, Dave 2007-11-28 18:56:07 Re: Select all fields except one
Previous Message Trevor Talbot 2007-11-28 18:44:07 Re: Linux v.s. Mac OS-X Performance