Ticket #1051: pg_schemas_full_rev4347.diff
File pg_schemas_full_rev4347.diff, 2.7 KB (added by , 18 years ago) |
---|
-
django/db/backends/postgresql/base.py
77 77 self.connection.set_isolation_level(1) # make transactions transparent to all cursors 78 78 cursor = self.connection.cursor() 79 79 cursor.execute("SET TIME ZONE %s", [settings.TIME_ZONE]) 80 if settings.DATABASE_SCHEMAS: 81 cursor.execute("SET search_path TO %s;" % settings.DATABASE_SCHEMAS) 80 82 cursor = UnicodeCursorWrapper(cursor, settings.DEFAULT_CHARSET) 81 83 if settings.DEBUG: 82 84 return util.CursorDebugWrapper(cursor, self) -
django/db/backends/postgresql_psycopg2/base.py
46 46 cursor = self.connection.cursor() 47 47 cursor.tzinfo_factory = None 48 48 cursor.execute("SET TIME ZONE %s", [settings.TIME_ZONE]) 49 if settings.DATABASE_SCHEMAS: 50 cursor.execute("SET search_path TO %s;" % settings.DATABASE_SCHEMAS) 49 51 if settings.DEBUG: 50 52 return util.CursorDebugWrapper(cursor, self) 51 53 return cursor -
django/conf/project_template/settings.py
11 11 12 12 DATABASE_ENGINE = '' # 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'. 13 13 DATABASE_NAME = '' # Or path to database file if using sqlite3. 14 DATABASE_SCHEMAS = '' # Only used with postgresq to support multiple schemas 14 15 DATABASE_USER = '' # Not used with sqlite3. 15 16 DATABASE_PASSWORD = '' # Not used with sqlite3. 16 17 DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3. -
docs/settings.txt
295 295 296 296 The username to use when connecting to the database. Not used with SQLite. 297 297 298 DATABASE_SCHEMAS 299 ---------------- 300 301 Default: ``''`` (Empty string) 302 303 On databases supporting Schemas, like PostgreSQL, the search_path will be 304 set to the value of this setting which is, by default, ``public``. 305 306 Please, note that currently the only backend which schema support is PostgreSQL. 307 298 308 DATE_FORMAT 299 309 ----------- 300 310