I'm trying to run bot with a PostgreSQL backend. Visiting the bot/log/ page I get:

PDOException: SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "REGEXP" LINE 1: SELECT * FROM bot_log WHERE channel REGEXP '#w3( |$)' AND (t... ^: SELECT * FROM {bot_log} WHERE channel REGEXP '#w3( |$)' AND (timestamp >= :date_start AND timestamp <= :date_end) ORDER BY id; Array ( [:date_start] => 1352505600 [:date_end] => 1352592000 ) in bot_log_date() (line 262 of modules/bot/bot_log/bot_log.module).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gaas’s picture

I've fixed it here by replacing the REGEXP match with two ORed LIKEs.

steinmb’s picture

Status: Active » Reviewed & tested by the community

Works OK for me. Looking good :)

Morbus Iff’s picture

Status: Reviewed & tested by the community » Needs work

At first glance, this patch is not equivalent to the REGEXP, which needs to bound by space or end-of-data.
The patch does "#channel " or "#channel", which would cause "#drupal-support" logs to show up under a request for "#drupal".

Nevermind. I'm wrong.

Morbus Iff’s picture

Status: Needs work » Reviewed & tested by the community
Morbus Iff’s picture

Status: Reviewed & tested by the community » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.