Roundup Tracker - Issues

Issue 1959261

classification
Incompatibility w. Postgres 8.3?
Type: Severity: normal
Components: Database Versions:
process
Status: closed fixed
:
: richard : alvherre, catucci, forsberg, richard
Priority: normal :

Created on 2008-05-07 06:53 by forsberg, last changed 2008-08-07 06:05 by richard.

Messages
msg2550 Author: [hidden] (forsberg) Date: 2008-05-07 06:53
Trying to run one of my tracker instances against an PostgreSQL 8.3, I'm getting a traceback in the roundup log:

2008-05-06 13:09:55,410 ERROR Exception handling message
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/roundup/mailgw.py", line 526, in handle_Message
    return self.handle_message(message)
  File "/usr/lib/python2.5/site-packages/roundup/mailgw.py", line 1103, in handle_message
    nodeid = cl.create(**props)
  File "/usr/lib/python2.5/site-packages/roundup/backends/rdbms_common.py", line 1304, in create
    newid = self.create_inner(**propvalues)
  File "/usr/lib/python2.5/site-packages/roundup/backends/rdbms_common.py", line 1402, in create_inner
    value)
  File "/usr/lib/python2.5/site-packages/roundup/backends/indexer_rdbms.py", line 45, in add_text
    self.db.cursor.execute(sql, identifier)
ProgrammingError: operator does not exist: character varying = integer
LINE 1: ...id from __textids where _class='issue' and _itemid=5000 and ...
                                                             ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.

Versions involved:

Python 2.5.2 (Ubuntu hardy package)
psycopg  1.1.21-15ubuntu1 (Ubuntu hardy package)
PostgreSQL 8.3.1-1 (Ubuntu hardy package)
Roundup, tested both 1.3.3-3.1ubuntu1 (Ubuntu hardy package) and 1.4.4 from tarball.

The same setup but running PostgreSQL 8.2.7-1 (Ubuntu hardy package) works as intended.

Doing some debugging, it seems like the result from the newid() function in the Database class in back_postgresql.py returns a long integer. This in turn seems to cause trouble in the indexer as the _itemid columns in the __textids tables is a varchar, not an integer.

Haven't had the time to try the unit tests against Postgres 8.3 yet. That would be interesting.
msg2551 Author: [hidden] (alvherre) Date: 2008-06-05 22:21
Yeah, in Postgres 8.3 you would have to insert an explicit cast --- the implicit casting rules have been tightened.
msg2552 Author: [hidden] (catucci) Date: 2008-07-28 16:41
Just added a patch for this mis-behaviour at #2030479
msg2553 Author: [hidden] (richard) Date: 2008-08-07 06:05
Should be fixed.
History
Date User Action Args
2008-05-07 06:53:58forsbergcreate