PGPASSWORD - More than one in a bash script

From: Patrick B <patrickbakerbr(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: PGPASSWORD - More than one in a bash script
Date: 2016-08-18 04:01:59
Message-ID: CAJNY3ivdmRhka38C75wfq2ga6kchDZs2HDVBaru8EuO7Q-=C1g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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?

I'm using PostgreSQL 9.5

cheers

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2016-08-18 04:09:35 Re: PGPASSWORD - More than one in a bash script
Previous Message James Sewell 2016-08-18 02:50:46 Re: Critical failure of standby