From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: yromero@onapsis.com
Subject: BUG #15499: pg_dump does not read connection URL from environment variable
Date: Mon, 12 Nov 2018 20:07:42 +0000
Message-ID: <15499-915b551f9a1861de@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 15499
Logged by: Yonatan Romero
Email address: yromero@onapsis.com
PostgreSQL version: Unsupported/Unknown
Operating system: Ubuntu 14.04 LTS
Description:
pg_dump's docs says this command can use connection string on --dbname
argument[1].
Also, the libpq environments variables's documentation says PGDATABASE
behaves the same as the dbname connection parameter[2].
I try to pass connection string on PGDATABASE environment variable, but it
does work.
yromero@onapsis:~$ env
PGDATABASE="postgresql://onapsis:secret@localhost/onapsis" pg_dump
pg_dump: [archiver (db)] connection to database
"postgresql://onapsis:secret@localhost/onapsis" failed: FATAL: role
"yromero" does not exist
References:
[1] https://www.postgresql.org/docs/9.3/app-pgrestore.html
[2] https://www.postgresql.org/docs/9.3/libpq-envars.html
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, yromero@onapsis.com
Subject: Re: BUG #15499: pg_dump does not read connection URL from environment variable
In-Reply-To: <15499-915b551f9a1861de@postgresql.org>
References: <15499-915b551f9a1861de@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox