Opened 18 years ago
Closed 18 years ago
#4013 closed task (fixed)
Make trac use database namespaces or available equivalents
Reported by: | anonymous | Owned by: | Jonas Borgström |
---|---|---|---|
Priority: | normal | Milestone: | not applicable |
Component: | general | Version: | 0.10 |
Severity: | normal | Keywords: | documentation |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
trac cannot be installed into a database that is already used by other software when it has the same names. Using schemas (postgresql) or namespaces (or whatever other dbms call it) would prevent this, as it sets some kind of prefix and search path for the data. That would ease the integration of trac into already existing databases, as it will allow to keep trac within the project database
Attachments (0)
Change History (7)
comment:1 by , 18 years ago
comment:2 by , 18 years ago
Isn't there support for schemas in PostgreSQLConnector?
from postgres_backend.py, PostgreSQLConnection constructor:
try: self.schema = None if 'schema' in params: self.schema = params['schema'] cnx.cursor().execute('SET search_path TO %s', (self.schema,)) except PGSchemaError: cnx.rollback()
and from postgres_backend.py, PostgreSQLConnector.init_db:
if cnx.schema: cursor.execute('CREATE SCHEMA "%s"' % cnx.schema) cursor.execute('SET search_path TO %s', (cnx.schema,))
comment:3 by , 18 years ago
Documentation is missing regarding how you specify the schema in the connection string.
comment:4 by , 18 years ago
Keywords: | documentation added |
---|---|
Type: | defect → task |
follow-up: 6 comment:5 by , 18 years ago
This needs to be in the PostgreSQL documentation:
database = postgres://user:pass@server/database?schema=yourschemaname
comment:6 by , 18 years ago
Replying to anonymous:
This needs to be in the PostgreSQL documentation:
database = postgres://user:pass@server/database?schema=yourschemaname
This site is a wiki, feel free to add things.
comment:7 by , 18 years ago
Milestone: | → not applicable |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Documented since TracEnvironment@17.
Just testing, please ignore — Jonas