The mollom.install file uses a SQL query that does now work for Postgres as you can't define indexes inline. A separate query is needed to create the index on the the session column. The patch attached resolves this, but I will include the complete changed function below:

/**
 * Implementation of hook_install().
 */
function mollom_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_query("CREATE TABLE {mollom} (
        did varchar(255) NOT NULL default '',
        session varchar(255) NOT NULL default '',
        quality varchar(255) NOT NULL default '',
        PRIMARY KEY (did),
        INDEX (session)
      );");
      break;
      
    case 'pgsql':
      db_query("CREATE TABLE {mollom} (
        did varchar(255) NOT NULL default '',
        session varchar(255) NOT NULL default '',
        quality varchar(255) NOT NULL default '',
        PRIMARY KEY (did)
      );");
      db_query("CREATE INDEX {mollom}_session_idx ON {mollom} (session);");
      break;
  }
}

This only affects the Drupal 5 versions of the module.

CommentFileSizeAuthor
mollom.install.patch.txt1.06 KBstormsweeper

Comments

stormsweeper’s picture

Status: Active » Needs review

I forgot to set the status when I created this issue.

dries’s picture

Great -- I've committed this to the Drupal 5 branch and I'll roll a new release the next couple of days. Thanks Stormsweeper.

dries’s picture

Status: Needs review » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

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