diff options
Diffstat (limited to 'django/db/backends/postgresql/client.py')
-rw-r--r-- | django/db/backends/postgresql/client.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/django/db/backends/postgresql/client.py b/django/db/backends/postgresql/client.py index 0efe0d47f0..9d390b3807 100644 --- a/django/db/backends/postgresql/client.py +++ b/django/db/backends/postgresql/client.py @@ -9,7 +9,7 @@ class DatabaseClient(BaseDatabaseClient): executable_name = 'psql' @classmethod - def runshell_db(cls, conn_params): + def runshell_db(cls, conn_params, parameters): args = [cls.executable_name] host = conn_params.get('host', '') @@ -29,6 +29,7 @@ class DatabaseClient(BaseDatabaseClient): if port: args += ['-p', str(port)] args += [dbname] + args.extend(parameters) sigint_handler = signal.getsignal(signal.SIGINT) subprocess_env = os.environ.copy() @@ -50,5 +51,5 @@ class DatabaseClient(BaseDatabaseClient): # Restore the original SIGINT handler. signal.signal(signal.SIGINT, sigint_handler) - def runshell(self): - DatabaseClient.runshell_db(self.connection.get_connection_params()) + def runshell(self, parameters): + self.runshell_db(self.connection.get_connection_params(), parameters) |