Modify

Opened 17 years ago

Closed 17 years ago

#2430 closed defect (fixed)

WatchSubscriber throws error on Postgres backend

Reported by: Peter Owned by: Stephen Hansen
Priority: normal Component: AnnouncerPlugin
Severity: critical Keywords:
Cc: Trac Release: 0.11

Description

After enabling WatchSubscriber and going into a ticket the following traceback is produced:

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/Trac-0.11b1-py2.5.egg/trac/web/api.py", line 339, in send_error
    'text/html')
  File "/usr/lib/python2.5/site-packages/Trac-0.11b1-py2.5.egg/trac/web/chrome.py", line 658, in render_template
    stream |= self._filter_stream(req, method, filename, stream, data)
  File "build/bdist.linux-i686/egg/genshi/core.py", line 128, in __or__
    return Stream(_ensure(function(self)), serializer=self.serializer)
  File "/usr/lib/python2.5/site-packages/Trac-0.11b1-py2.5.egg/trac/web/chrome.py", line 745, in inner
    data)
  File "build/bdist.linux-i686/egg/worklog/ticket_filter.py", line 117, in filter_stream
    task = mgr.get_active_task()
  File "build/bdist.linux-i686/egg/worklog/manager.py", line 268, in get_active_task
    task = self.get_latest_task()
  File "build/bdist.linux-i686/egg/worklog/manager.py", line 241, in get_latest_task
    cursor.execute('SELECT MAX(lastchange) FROM work_log WHERE worker=%s', (self.authname,))
  File "/usr/lib/python2.5/site-packages/Trac-0.11b1-py2.5.egg/trac/db/util.py", line 50, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "/usr/lib/python2.5/site-packages/Trac-0.11b1-py2.5.egg/trac/db/util.py", line 50, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
ProgrammingError: current transaction is aborted, commands ignored until end of transaction block

The actual error thrown by Postgres is:

Jan 17 05:18:05 db postgres[77808]: [2-1] ERROR:  operator does not exist: integ
er = boolean at character 108
Jan 17 05:18:05 db postgres[77808]: [2-2] HINT:  No operator matches the given n
ame and argument type(s). You may need to add explicit type casts.
Jan 17 05:18:05 db postgres[77808]: [2-3] STATEMENT:
Jan 17 05:18:05 db postgres[77808]: [2-4]                   SELECT id
Jan 17 05:18:05 db postgres[77808]: [2-5]                     FROM subscriptions
Jan 17 05:18:05 db postgres[77808]: [2-6]                    WHERE sid='username' AND authenticated=true
Jan 17 05:18:05 db postgres[77808]: [2-7]                      AND enabled=1 AND
 managed='watcher'
Jan 17 05:18:05 db postgres[77808]: [2-8]                      AND realm='ticket
'
Jan 17 05:18:05 db postgres[77808]: [2-9]                      AND category='cha
nged'
Jan 17 05:18:05 db postgres[77808]: [2-10]                     AND rule='570'
Jan 17 05:18:05 db postgres[77808]: [2-11]

Apparently it does not like 'authenticated=true' condition as column 'authenticated' is declared as integer, and Postgres does not automatically typecast boolean to/from integer.

Attachments (0)

Change History (2)

comment:1 Changed 17 years ago by Stephen Hansen

Status: newassigned

comment:2 Changed 17 years ago by Stephen Hansen

Resolution: fixed
Status: assignedclosed

r3088 should resolve this particular issue.

Note: I can't promise any postgres compatibility yet; we're not using it with our corporate trac to postgres in a couple weeks. :) But if you run into any other issues, let me know.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Stephen Hansen.
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.