mirror of
https://github.com/django/django.git
synced 2025-10-25 14:46:09 +00:00
Fixed #33854 -- Corrected the order of parameters in dbshell on PostgreSQL.
This commit is contained in:
@@ -32,9 +32,9 @@ class DatabaseClient(BaseDatabaseClient):
|
|||||||
args += ["-h", host]
|
args += ["-h", host]
|
||||||
if port:
|
if port:
|
||||||
args += ["-p", str(port)]
|
args += ["-p", str(port)]
|
||||||
|
args.extend(parameters)
|
||||||
if dbname:
|
if dbname:
|
||||||
args += [dbname]
|
args += [dbname]
|
||||||
args.extend(parameters)
|
|
||||||
|
|
||||||
env = {}
|
env = {}
|
||||||
if passwd:
|
if passwd:
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ class PostgreSqlDbshellCommandTestCase(SimpleTestCase):
|
|||||||
def test_parameters(self):
|
def test_parameters(self):
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
self.settings_to_cmd_args_env({"NAME": "dbname"}, ["--help"]),
|
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")
|
@skipUnless(connection.vendor == "postgresql", "Requires a PostgreSQL connection")
|
||||||
|
|||||||
Reference in New Issue
Block a user