Re: [PATCH] pgpassfile connection option

From: Julian Markwort <julian(dot)markwort(at)uni-muenster(dot)de>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] pgpassfile connection option
Date: 2016-11-01 12:58:41
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Alright, here goes another one:
1. Cleaned up the clutter with getPgPassFilename - the function is now
named fillDefaultPGPassFile() and only does exactly that.
2. Since a connection option "pgpassfile" or environment variable
"PGPASSFILE" are picked up in conninfo_add_defaults() or in case a
password was needed, but neither a pgpassfile connection option or
environment variable were set, we'd have filled the conn->pgpassfile
field with the "default" ~/.pgpass stuff.
Thus, when returning with an error, if conn->pgpassfile was set and a
password was necessary, we must have tried that pgpassfile, so i got rid
of the field "dot_pgpass_used" in the pg_conn struct and the pgpassfile
string is always used in the error message.
3. Going on, I renamed "dot_pg_pass_warning()" to "PGPassFileWarning()"

Kind regards,
Julian Markwort

Attachment Content-Type Size
pgpassfiles_v3.patch text/plain 8.6 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-11-01 13:15:27 Re: auto_explain vs. parallel query
Previous Message Fabien COELHO 2016-11-01 12:26:14 Re: pgbench - allow backslash continuations in \set expressions