Index: django/conf/global_settings.py
===================================================================
--- django/conf/global_settings.py	(revision 3886)
+++ django/conf/global_settings.py	(working copy)
@@ -100,6 +100,7 @@
 DATABASE_PASSWORD = ''         # Not used with sqlite3.
 DATABASE_HOST = ''             # Set to empty string for localhost. Not used with sqlite3.
 DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.
+DATABASE_OPTIONS = {}          # Set to empy dictionary for default.
 
 # Host for sending e-mail.
 EMAIL_HOST = 'localhost'
Index: django/db/__init__.py
===================================================================
--- django/db/__init__.py	(revision 3886)
+++ django/db/__init__.py	(working copy)
@@ -6,6 +6,8 @@
 
 if not settings.DATABASE_ENGINE:
     settings.DATABASE_ENGINE = 'dummy'
+if not settings.DATABASE_OPTIONS:
+    settings.DATABASE_OPTIONS = {}
 
 try:
     backend = __import__('django.db.backends.%s.base' % settings.DATABASE_ENGINE, '', '', [''])
@@ -27,7 +29,7 @@
 get_creation_module = lambda: __import__('django.db.backends.%s.creation' % settings.DATABASE_ENGINE, '', '', [''])
 runshell = lambda: __import__('django.db.backends.%s.client' % settings.DATABASE_ENGINE, '', '', ['']).runshell()
 
-connection = backend.DatabaseWrapper()
+connection = backend.DatabaseWrapper(**settings.DATABASE_OPTIONS)
 DatabaseError = backend.DatabaseError
 
 # Register an event that closes the database connection
Index: django/db/backends/ado_mssql/base.py
===================================================================
--- django/db/backends/ado_mssql/base.py	(revision 3886)
+++ django/db/backends/ado_mssql/base.py	(working copy)
@@ -55,7 +55,7 @@
     from django.utils._threading_local import local
 
 class DatabaseWrapper(local):
-    def __init__(self):
+    def __init__(self, **kwargs):
         self.connection = None
         self.queries = []
 
Index: django/db/backends/postgresql/base.py
===================================================================
--- django/db/backends/postgresql/base.py	(revision 3886)
+++ django/db/backends/postgresql/base.py	(working copy)
@@ -21,9 +21,10 @@
     from django.utils._threading_local import local
 
 class DatabaseWrapper(local):
-    def __init__(self):
+    def __init__(self, **kwargs):
         self.connection = None
         self.queries = []
+        self.options = kwargs
 
     def cursor(self):
         from django.conf import settings
@@ -40,7 +41,7 @@
                 conn_string += " host=%s" % settings.DATABASE_HOST
             if settings.DATABASE_PORT:
                 conn_string += " port=%s" % settings.DATABASE_PORT
-            self.connection = Database.connect(conn_string)
+            self.connection = Database.connect(conn_string, **self.options)
             self.connection.set_isolation_level(1) # make transactions transparent to all cursors
         cursor = self.connection.cursor()
         cursor.execute("SET TIME ZONE %s", [settings.TIME_ZONE])
Index: django/db/backends/sqlite3/base.py
===================================================================
--- django/db/backends/sqlite3/base.py	(revision 3886)
+++ django/db/backends/sqlite3/base.py	(working copy)
@@ -42,16 +42,20 @@
     from django.utils._threading_local import local
 
 class DatabaseWrapper(local):
-    def __init__(self):
+    def __init__(self, **kwargs):
         self.connection = None
         self.queries = []
+        self.options = kwargs
 
     def cursor(self):
         from django.conf import settings
         if self.connection is None:
-            self.connection = Database.connect(settings.DATABASE_NAME,
-                detect_types=Database.PARSE_DECLTYPES | Database.PARSE_COLNAMES)
-
+            kwargs = {
+                'database': settings.DATABASE_NAME,
+                'detect_types': Database.PARSE_DECLTYPES | Database.PARSE_COLNAMES,
+            }
+            kwargs.update(self.options)
+            self.connection = Database.connect(**kwargs)
             # Register extract and date_trunc functions.
             self.connection.create_function("django_extract", 2, _sqlite_extract)
             self.connection.create_function("django_date_trunc", 2, _sqlite_date_trunc)
Index: django/db/backends/mysql/base.py
===================================================================
--- django/db/backends/mysql/base.py	(revision 3886)
+++ django/db/backends/mysql/base.py	(working copy)
@@ -65,10 +65,11 @@
     from django.utils._threading_local import local
 
 class DatabaseWrapper(local):
-    def __init__(self):
+    def __init__(self, **kwargs):
         self.connection = None
         self.queries = []
         self.server_version = None
+        self.options = kwargs
 
     def _valid_connection(self):
         if self.connection is not None:
@@ -95,6 +96,7 @@
                 kwargs['host'] = settings.DATABASE_HOST
             if settings.DATABASE_PORT:
                 kwargs['port'] = int(settings.DATABASE_PORT)
+            kwargs.update(self.options)
             self.connection = Database.connect(**kwargs)
         cursor = self.connection.cursor()
         if self.connection.get_server_info() >= '4.1':
Index: django/db/backends/oracle/base.py
===================================================================
--- django/db/backends/oracle/base.py	(revision 3886)
+++ django/db/backends/oracle/base.py	(working copy)
@@ -21,9 +21,10 @@
     from django.utils._threading_local import local
 
 class DatabaseWrapper(local):
-    def __init__(self):
+    def __init__(self, **kwargs):
         self.connection = None
         self.queries = []
+        self.options = kwargs
 
     def _valid_connection(self):
         return self.connection is not None
@@ -35,10 +36,10 @@
                 settings.DATABASE_HOST = 'localhost'
             if len(settings.DATABASE_PORT.strip()) != 0:
                 dsn = Database.makedsn(settings.DATABASE_HOST, int(settings.DATABASE_PORT), settings.DATABASE_NAME)
-                self.connection = Database.connect(settings.DATABASE_USER, settings.DATABASE_PASSWORD, dsn)
+                self.connection = Database.connect(settings.DATABASE_USER, settings.DATABASE_PASSWORD, dsn, **self.options)
             else:
                 conn_string = "%s/%s@%s" % (settings.DATABASE_USER, settings.DATABASE_PASSWORD, settings.DATABASE_NAME)
-                self.connection = Database.connect(conn_string)
+                self.connection = Database.connect(conn_string, **self.options)
         return FormatStylePlaceholderCursor(self.connection)
 
     def _commit(self):
Index: django/db/backends/postgresql_psycopg2/base.py
===================================================================
--- django/db/backends/postgresql_psycopg2/base.py	(revision 3886)
+++ django/db/backends/postgresql_psycopg2/base.py	(working copy)
@@ -21,9 +21,10 @@
     from django.utils._threading_local import local
 
 class DatabaseWrapper(local):
-    def __init__(self):
+    def __init__(self, **kwargs):
         self.connection = None
         self.queries = []
+        self.options = kwargs
 
     def cursor(self):
         from django.conf import settings
@@ -40,7 +41,7 @@
                 conn_string += " host=%s" % settings.DATABASE_HOST
             if settings.DATABASE_PORT:
                 conn_string += " port=%s" % settings.DATABASE_PORT
-            self.connection = Database.connect(conn_string)
+            self.connection = Database.connect(conn_string, **self.options)
             self.connection.set_isolation_level(1) # make transactions transparent to all cursors
         cursor = self.connection.cursor()
         cursor.tzinfo_factory = None
Index: django/db/backends/dummy/base.py
===================================================================
--- django/db/backends/dummy/base.py	(revision 3886)
+++ django/db/backends/dummy/base.py	(working copy)
@@ -20,6 +20,9 @@
     _commit = complain
     _rollback = complain
 
+    def __init__(self, **kwargs):
+        pass
+
     def close(self):
         pass # close()
 
Index: docs/settings.txt
===================================================================
--- docs/settings.txt	(revision 3886)
+++ docs/settings.txt	(working copy)
@@ -265,6 +265,14 @@
 The name of the database to use. For SQLite, it's the full path to the database
 file.
 
+DATABASE_OPTIONS
+----------------
+
+Default: ``{}`` (Empty dictionary)
+
+Extra parameters to use when connecting to the database. Consult backend
+module's document for available keywords.
+
 DATABASE_PASSWORD
 -----------------
 
