BUG #15499: pg_dump does not read connection URL from environment variable

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: yromero(at)onapsis(dot)com
Subject: BUG #15499: pg_dump does not read connection URL from environment variable
Date: 2018-11-12 20:07:42
Message-ID: 15499-915b551f9a1861de@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 15499
Logged by: Yonatan Romero
Email address: yromero(at)onapsis(dot)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(at)onapsis:~$ env
PGDATABASE="postgresql://onapsis:secret(at)localhost/onapsis" pg_dump
pg_dump: [archiver (db)] connection to database
"postgresql://onapsis:secret(at)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

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2018-11-12 21:03:56 Re: BUG #15499: pg_dump does not read connection URL from environment variable
Previous Message Derek Nelson 2018-11-12 20:00:32 Re: Tables created WITH OIDS cannot be dumped/restored properly