Re: PGPASSWORD - More than one in a bash script - Mailing list pgsql-general

From Adrian Klaver
Subject Re: PGPASSWORD - More than one in a bash script
Date
Msg-id f8e6ce47-ea7c-0c83-02eb-3ce18c7a0943@aklaver.com
Whole thread Raw
In response to PGPASSWORD - More than one in a bash script  (Patrick B <patrickbakerbr@gmail.com>)
List pgsql-general
On 08/17/2016 09:01 PM, Patrick B wrote:
> Hi guys,
>
> I'm writing a bash script to dump and restore (pg_dump + pg_restore) a
> test database.
>
> However, the username to access the pg_dump server is different of the
> one to access pg_restore.
>
> I'm using the PGPASSWORD parameter on the script, but can I put two of that?
>
> like:
>
>     PGPASSWORD
>     PGPASSWORD2
>
> If not, do you guys have any idea how I could do this?

https://www.postgresql.org/docs/9.5/static/libpq-pgpass.html

>
> I'm using PostgreSQL 9.5
>
> cheers
>


--
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-general by date:

Previous
From: Patrick B
Date:
Subject: PGPASSWORD - More than one in a bash script
Next
From: hamann.w@t-online.de
Date:
Subject: SQL help - multiple aggregates