Opened 9 years ago

Closed 9 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


i've installed the plugin on trac (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==', 'console_scripts', 'trac-admin')()

File "/usr/lib/python2.5/site-packages/Trac-", line 1294, in run

return admin.onecmd(command)

File "/usr/lib/python2.5/site-packages/Trac-", line 123, in onecmd

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

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

return func(arg)

File "/usr/lib/python2.5/site-packages/Trac-", line 1144, in do_upgrade


File "/usr/lib/python2.5/site-packages/Trac-", line 449, in upgrade


File "build/bdist.linux-i686/egg/tickettemplate/", line 93, in upgrade_environment File "build/bdist.linux-i686/egg/tickettemplate/", line 69, in environment_created File "/usr/lib/python2.5/site-packages/Trac-", line 51, in execute

return self.cursor.execute(sql)

File "/usr/lib/python2.5/site-packages/Trac-", line 51, in execute

return self.cursor.execute(sql)

File "/usr/lib/python2.5/site-packages/pyPgSQL/", 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 9 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 9 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
as closed The owner will remain Richard Liao.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.