Re: [PATCH] pgpassfile connection option - Mailing list pgsql-hackers

From Julian Markwort
Subject Re: [PATCH] pgpassfile connection option
Date
Msg-id 58189181.3080709@uni-muenster.de
Whole thread Raw
In response to Re: [PATCH] pgpassfile connection option  (Fabien COELHO <coelho@cri.ensmp.fr>)
Responses Re: [PATCH] pgpassfile connection option
Re: [PATCH] pgpassfile connection option
List 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

pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: pgbench - allow backslash continuations in \set expressions
Next
From: Robert Haas
Date:
Subject: Re: auto_explain vs. parallel query