Fix behavior of psql -c option with postgresql 9.6

psql -c option no longer implies --no-psqlrc with postgresql 9.6, it must be set explicitly.

Fixes #36787.
This commit is contained in:
Maxime Guillet 2016-10-05 12:19:54 +02:00
parent 90cca6b135
commit 574e30e915

View file

@ -306,6 +306,7 @@ def _psql_cmd(*args, **kwargs):
cmd = [salt.utils.which('psql'),
'--no-align',
'--no-readline',
'--no-psqlrc',
'--no-password'] # It is never acceptable to issue a password prompt.
if user:
cmd += ['--username', user]