Edgewall Software
Modify

Opened 19 years ago

Closed 19 years ago

#2308 closed defect (duplicate)

custom port unhandled while using psycopg

Reported by: Marcin.Kasperski@… Owned by: daniel
Priority: normal Milestone:
Component: admin/console Version: 0.9
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I tried using trac-admin with the following database string: postgres://USER:PWD@localhost:5433/DBNAME but it occured that I get connection failures mentioning … port 5432.

Quick look at the code of site-packages/trac/db.py shows why:

        if psycopg:
            dsn = []
            if path:
                dsn.append('dbname=' + path)
            if user:
                dsn.append('user=' + user)
            if password:
                dsn.append('password=' + password)
            if host:
                dsn.append('host=' + host)
            cnx = psycopg.connect(' '.join(dsn))

There is no if for port option!

Observed on trac from debian unstable (0.9.1)

Attachments (0)

Change History (2)

comment:1 by Allan, 19 years ago

I reported this same bug two months ago, with no response: #2167

comment:2 by Matthew Good, 19 years ago

Resolution: duplicate
Status: newclosed

Well, then this can be closed as a duplicate.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain daniel.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from daniel 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.