Modify

Opened 15 years ago

Closed 15 years ago

#4294 closed defect (fixed)

Error on postgresql

Reported by: anonymous Owned by: Richard Liao
Priority: high Component: TracTicketTemplatePlugin
Severity: blocker Keywords: postgresql
Cc: Trac Release: 0.11

Description

i've installed the plugin on trac 0.11.2.1 (using postgresql 8.3) but when i upgrade the project occurs this error:

trac-admin /home/svn/trac/repo1 upgrade --no-backup

if warn: warnings.warn(_use_error_msg) Traceback (most recent call last):

File "/usr/bin/trac-admin", line 8, in <module>

load_entry_point('Trac==0.11.2.1', 'console_scripts', 'trac-admin')()

File "/usr/lib/python2.5/site-packages/Trac-0.11.2.1-py2.5.egg/trac/admin/console.py", line 1294, in run

return admin.onecmd(command)

File "/usr/lib/python2.5/site-packages/Trac-0.11.2.1-py2.5.egg/trac/admin/console.py", line 123, in onecmd

rv = cmd.Cmd.onecmd(self, line) or 0

File "/usr/lib/python2.5/cmd.py", line 219, in onecmd

return func(arg)

File "/usr/lib/python2.5/site-packages/Trac-0.11.2.1-py2.5.egg/trac/admin/console.py", line 1144, in do_upgrade

self.env.upgrade(backup=do_backup)

File "/usr/lib/python2.5/site-packages/Trac-0.11.2.1-py2.5.egg/trac/env.py", line 449, in upgrade

participant.upgrade_environment(db)

File "build/bdist.linux-i686/egg/tickettemplate/ttadmin.py", line 93, in upgrade_environment File "build/bdist.linux-i686/egg/tickettemplate/ttadmin.py", line 69, in environment_created File "/usr/lib/python2.5/site-packages/Trac-0.11.2.1-py2.5.egg/trac/db/util.py", line 51, in execute

return self.cursor.execute(sql)

File "/usr/lib/python2.5/site-packages/Trac-0.11.2.1-py2.5.egg/trac/db/util.py", line 51, in execute

return self.cursor.execute(sql)

File "/usr/lib/python2.5/site-packages/pyPgSQL/PgSQL.py", line 3111, in execute

raise OperationalError, msg

libpq.OperationalError: ERRO: erro de sintaxe em ou próximo a "user" LINE 2: user text,

Attachments (0)

Change History (2)

comment:1 Changed 15 years ago by chuntley@…

The problem seems to be the use of the column name "user" on the tt_custom table. SQL has "user"as a reserved work, which makes postgresql fail.

I'm not exactly clear on why we need the "tt_custom" table anyway. It seems to be empty by default and defining templates does not seem to write anything there.

comment:2 Changed 15 years ago by Richard Liao

Resolution: fixed
Status: newclosed

Fixed in [5179]. Renamed user to username to avoid keyword problem with postgresql.

The "tt_custom" table is used to store user specific templates, which is not actived in current version yet.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Richard Liao.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.