PostgreSQL doesn't have a REGEXP operator

Bug #595423 reported by Stefano Rivera on 2010-06-17
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ibid
Low
Stefano Rivera

Bug Description

2010-06-17 11:06:17,197 ERROR core.dispatcher: Exception occured in Search processor of factoid plugin.
Event: {'account': 1, 'responses': [], 'source': u'atrum', 'addressed': u'tibid', 'session': <sqlalchemy.orm.session.Session object at 0x3baeb50>, 'processed': False, 'time': datetime.datetime(2010, 6, 17, 9, 6, 17, 189849), 'identity': 1, 'message': {'raw': u'tibid: search for facts containing /pomp/r', 'deaddressed': u'search for facts containing /pomp/r', 'clean': u'search for facts containing /pomp/r', 'stripped': u'tibid: search for facts containing /pomp/r'}, 'type': u'message', 'public': True, 'channel': u'#ibidtest', 'sender': {'nick': u'tumbleweed', 'connection': u'tumbleweed!<email address hidden>', 'id': u'tumbleweed'}}
Traceback (most recent call last):
  File "./ibid/core.py", line 28, in process
    processor.process(event)
  File "/home/stefanor/bzr/ibid/stefanor/tibid/ibid/plugins/__init__.py", line 145, in process
    method(event, *match.groups())
  File "./ibid/plugins/factoid.py", line 428, in search
    matches = [match for match in query[start:start+limit]]
  File "/usr/lib/pymodules/python2.5/sqlalchemy/orm/query.py", line 1374, in __getitem__
    return list(res)
  File "/usr/lib/pymodules/python2.5/sqlalchemy/orm/query.py", line 1534, in __iter__
    return self._execute_and_instances(context)
  File "/usr/lib/pymodules/python2.5/sqlalchemy/orm/query.py", line 1539, in _execute_and_instances
    mapper=self._mapper_zero_or_none())
  File "/usr/lib/pymodules/python2.5/sqlalchemy/orm/session.py", line 735, in execute
    clause, params or {})
  File "/usr/lib/pymodules/python2.5/sqlalchemy/engine/base.py", line 1157, in execute
    params)
  File "/usr/lib/pymodules/python2.5/sqlalchemy/engine/base.py", line 1237, in _execute_clauseelement
    return self.__execute_context(context)
  File "/usr/lib/pymodules/python2.5/sqlalchemy/engine/base.py", line 1268, in __execute_context
    context.parameters[0], context=context)
  File "/usr/lib/pymodules/python2.5/sqlalchemy/engine/base.py", line 1367, in _cursor_execute
    context)
  File "/usr/lib/pymodules/python2.5/sqlalchemy/engine/base.py", line 1360, in _cursor_execute
    context)
  File "/usr/lib/pymodules/python2.5/sqlalchemy/engine/default.py", line 277, in do_execute
    cursor.execute(statement, parameters)
ProgrammingError: (ProgrammingError) syntax error at or near "REGEXP"
LINE 3: WHERE factoid_names.name REGEXP E'pomp'
                                 ^
 'SELECT factoids.id AS factoids_id, factoids.time AS factoids_time, factoids.factpack AS factoids_factpack, factoid_names.id AS factoid_names_id, factoid_names.name AS factoid_names_name, factoid_names.factoid_id AS factoid_names_factoid_id, factoid_names.identity_id AS factoid_names_identity_id, factoid_names.time AS factoid_names_time, factoid_names.factpack AS factoid_names_factpack, factoid_names.wild AS factoid_names_wild \nFROM factoids JOIN factoid_names ON factoids.id = factoid_names.factoid_id JOIN factoid_values ON factoids.id = factoid_values.factoid_id \nWHERE factoid_names.name REGEXP %(name_1)s \n LIMIT 10 OFFSET 0' {'name_1': u'pomp'}

Related branches

Changed in ibid:
assignee: nobody → Stefano Rivera (stefanor)
status: Triaged → In Progress
Changed in ibid:
status: In Progress → Fix Committed
Changed in ibid:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers