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.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/django/db/backends/postgresql/client.py b/django/db/backends/postgresql/client.py
index 28daed833a..63f28a7b57 100644
--- a/django/db/backends/postgresql/client.py
+++ b/django/db/backends/postgresql/client.py
@@ -3,8 +3,10 @@ from django.conf import settings
import os
class DatabaseClient(BaseDatabaseClient):
+ executable_name = 'psql'
+
def runshell(self):
- args = ['psql']
+ args = [self.executable_name]
if settings.DATABASE_USER:
args += ["-U", settings.DATABASE_USER]
if settings.DATABASE_PASSWORD:
@@ -14,4 +16,4 @@ class DatabaseClient(BaseDatabaseClient):
if settings.DATABASE_PORT:
args.extend(["-p", str(settings.DATABASE_PORT)])
args += [settings.DATABASE_NAME]
- os.execvp('psql', args)
+ os.execvp(self.executable_name, args)