[Issue #197] setting session parameters via PGOPTIONS envvar breaks parsing of backup.control

This commit is contained in:
Grigory Smolkin
2020-04-26 02:05:46 +03:00
parent f7159f3333
commit 95825afcfe
+4 -2
View File
@@ -187,8 +187,10 @@ pgut_get_conninfo_string(PGconn *conn)
(option->val != NULL && option->val[0] == '\0'))
continue;
/* do not print password into the file */
if (strcmp(option->keyword, "password") == 0)
/* do not print password, passfile and options into the file */
if (strcmp(option->keyword, "password") == 0 ||
strcmp(option->keyword, "passfile") == 0 ||
strcmp(option->keyword, "options") == 0)
continue;
if (!firstkeyword)