=== modified file 'django/conf/project_template/settings.py'
--- django/conf/project_template/settings.py	2007-05-20 01:20:17 +0000
+++ django/conf/project_template/settings.py	2007-05-21 13:24:26 +0000
@@ -11,6 +11,7 @@
 
 DATABASE_ENGINE = ''           # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
 DATABASE_NAME = ''             # Or path to database file if using sqlite3.
+DATABASE_SCHEMAS = ''          # Only used with postgresq to support multiple schemas
 DATABASE_USER = ''             # Not used with sqlite3.
 DATABASE_PASSWORD = ''         # Not used with sqlite3.
 DATABASE_HOST = ''             # Set to empty string for localhost. Not used with sqlite3.

=== modified file 'django/db/backends/postgresql/base.py'
--- django/db/backends/postgresql/base.py	2007-05-21 10:14:36 +0000
+++ django/db/backends/postgresql/base.py	2007-05-21 13:25:33 +0000
@@ -83,6 +83,8 @@
         cursor = self.connection.cursor()
         if set_tz:
             cursor.execute("SET TIME ZONE %s", [settings.TIME_ZONE])
+        if settings.DATABASE_SCHEMAS:
+            cursor.execute("SET search_path TO %s;" % settings.DATABASE_SCHEMAS)
         cursor = UnicodeCursorWrapper(cursor, settings.DEFAULT_CHARSET)
         global postgres_version
         if not postgres_version:

=== modified file 'django/db/backends/postgresql_psycopg2/base.py'
--- django/db/backends/postgresql_psycopg2/base.py	2007-05-20 01:20:19 +0000
+++ django/db/backends/postgresql_psycopg2/base.py	2007-05-21 13:26:05 +0000
@@ -52,6 +52,8 @@
         cursor.tzinfo_factory = None
         if set_tz:
             cursor.execute("SET TIME ZONE %s", [settings.TIME_ZONE])
+        if settings.DATABASE_SCHEMAS:
+            cursor.execute("SET search_path TO %s;" % settings.DATABASE_SCHEMAS)
         global postgres_version
         if not postgres_version:
             cursor.execute("SELECT version()")

=== modified file 'docs/settings.txt'
--- docs/settings.txt	2007-05-20 01:20:21 +0000
+++ docs/settings.txt	2007-05-21 13:24:26 +0000
@@ -302,6 +302,16 @@
 
 The username to use when connecting to the database. Not used with SQLite.
 
+DATABASE_SCHEMAS
+----------------
+
+Default: ``''`` (Empty string)
+
+On databases supporting Schemas, like PostgreSQL, the search_path will be
+set to the value of this setting which is, by default, ``public``.
+
+Please, note that currently the only backend which schema support is PostgreSQL.
+
 DATE_FORMAT
 -----------
 

