mirror of https://github.com/django/django.git
Fixed #33854 -- Corrected the order of parameters in dbshell on PostgreSQL.
This commit is contained in:
parent
b4817d20b9
commit
3e3e814166
|
@ -32,9 +32,9 @@ class DatabaseClient(BaseDatabaseClient):
|
|||
args += ["-h", host]
|
||||
if port:
|
||||
args += ["-p", str(port)]
|
||||
args.extend(parameters)
|
||||
if dbname:
|
||||
args += [dbname]
|
||||
args.extend(parameters)
|
||||
|
||||
env = {}
|
||||
if passwd:
|
||||
|
|
|
@ -154,7 +154,7 @@ class PostgreSqlDbshellCommandTestCase(SimpleTestCase):
|
|||
def test_parameters(self):
|
||||
self.assertEqual(
|
||||
self.settings_to_cmd_args_env({"NAME": "dbname"}, ["--help"]),
|
||||
(["psql", "dbname", "--help"], None),
|
||||
(["psql", "--help", "dbname"], None),
|
||||
)
|
||||
|
||||
@skipUnless(connection.vendor == "postgresql", "Requires a PostgreSQL connection")
|
||||
|
|
Loading…
Reference in New Issue