summaryrefslogtreecommitdiff
path: root/django/db/backends/postgresql/client.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/db/backends/postgresql/client.py')
-rw-r--r--django/db/backends/postgresql/client.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/django/db/backends/postgresql/client.py b/django/db/backends/postgresql/client.py
index 873af8cc14..3effab65a8 100644
--- a/django/db/backends/postgresql/client.py
+++ b/django/db/backends/postgresql/client.py
@@ -16,6 +16,7 @@ class DatabaseClient(BaseDatabaseClient):
dbname = settings_dict.get('NAME')
user = settings_dict.get('USER')
passwd = settings_dict.get('PASSWORD')
+ passfile = options.get('passfile')
service = options.get('service')
sslmode = options.get('sslmode')
sslrootcert = options.get('sslrootcert')
@@ -48,6 +49,8 @@ class DatabaseClient(BaseDatabaseClient):
env['PGSSLCERT'] = str(sslcert)
if sslkey:
env['PGSSLKEY'] = str(sslkey)
+ if passfile:
+ env['PGPASSFILE'] = str(passfile)
return args, env
def runshell(self, parameters):