Re: shell script to SQL statement: `pg_dump | psql -U` - Mailing list pgsql-general

From Tom Lane
Subject Re: shell script to SQL statement: `pg_dump | psql -U`
Date
Msg-id 14352.1174405674@sss.pgh.pa.us
Whole thread Raw
In response to shell script to SQL statement: `pg_dump | psql -U`  ("filippo" <filippo2991@virgilio.it>)
Responses Re: shell script to SQL statement: `pg_dump | psql -U`  ("filippo" <filippo2991@virgilio.it>)
List pgsql-general
"filippo" <filippo2991@virgilio.it> writes:
> The problem with the current implementation is that sometime pd_dump
> and psql ask for password but I want to create the database copy
> without any user typing (it is a cron script).

Create a ~/.pgpass file for the user that runs the cron job.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: LISTEN/NOTIFY and python
Next
From: Ron Johnson
Date:
Subject: Re: pg installation for dummies