Edgewall Software
Modify

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 Jonas Borgström, 18 years ago

Just testing, please ignore — Jonas

comment:2 by anonymous, 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 anonymous, 18 years ago

Documentation is missing regarding how you specify the schema in the connection string.

comment:4 by Matthew Good, 18 years ago

Keywords: documentation added
Type: defecttask

comment:5 by anonymous, 18 years ago

This needs to be in the PostgreSQL documentation:

database = postgres://user:pass@server/database?schema=yourschemaname

in reply to:  5 comment:6 by Noah Kantrowitz (coderanger) <coderanger@…>, 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 Christian Boos, 18 years ago

Milestone: not applicable
Resolution: fixed
Status: newclosed

Documented since TracEnvironment@17.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.