Ticket #2430 (closed defect: fixed)

Opened 10 months ago

Last modified 10 months ago

WatchSubscriber throws error on Postgres backend

Reported by: goldman Assigned to: ixokai
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

Change History

01/17/08 19:50:40 changed by ixokai

  • status changed from new to assigned.

01/17/08 19:56:35 changed by ixokai

  • status changed from assigned to closed.
  • resolution set to fixed.

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.


Add/Change #2430 (WatchSubscriber throws error on Postgres backend)




Change Properties
Action