diff --git a/django/core/db/backends/postgresql.py b/django/core/db/backends/postgresql.py index 1db6fe40c3..b1b2d9cb52 100644 --- a/django/core/db/backends/postgresql.py +++ b/django/core/db/backends/postgresql.py @@ -24,7 +24,7 @@ class DatabaseWrapper: if DATABASE_USER: conn_string = "user=%s %s" % (DATABASE_USER, conn_string) if DATABASE_PASSWORD: - conn_string += " password=%s" % DATABASE_PASSWORD + conn_string += " password='%s'" % DATABASE_PASSWORD if DATABASE_HOST: conn_string += " host=%s" % DATABASE_HOST if DATABASE_PORT: