Attached is a spam.pgsql file that seems to work for me.

CommentFileSizeAuthor
#4 spam.patch521 bytesZed Pobre
spam.pgsql1.86 KBZed Pobre
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Zed Pobre’s picture

There are additional problems in spam.module itself, it seems. In PostgreSQL, ' and " have different meanings, and you use " (which is used in PostgreSQL for selecting columns) when you generally need to use ' (which is used for specifying a string).

Unfortunately, fixing this is going to be somewhat tedious, since these characters are generally embedded in another string... which used the opposite style of quote to begin and end, and thus must be reversed as well.

Anonymous’s picture

Thanks! spam.pgsql is committed and spam.module is updated to use " for strings in db_queries. The change is only committed to the CVS version at the moment -- please test and confirm that everything works as intended.

Zed Pobre’s picture

Great progress has been made, but it's not completely fixed yet. I was able to successfully mark a number of comments as not spam, but when I tried changing the status from not spam to spam on one of the comments as a test, I got:

user error: query: SELECT * FROM spam_tokens WHERE probability > 80 AND token LIKE "URL%%" ORDER BY token ASC LIMIT 25 OFFSET 0
warning: pg_query(): Query failed: ERROR: column "URL%%" does not exist
user error: query: SELECT COUNT(*) FROM spam_tokens WHERE probability > 80 AND token LIKE "URL%%"
warning: pg_query(): Query failed: ERROR: column "URL%%" does not exist
Zed Pobre’s picture

FileSize
521 bytes

The attached patch seems to clear up the last problems.

Thanks for looking into this so quickly.

Jeremy’s picture

Fixes commited to cvs head and the 4.5 version of the spam module. Thanks! If you run into any further PostgreSQL support issues, please let me know.

Anonymous’s picture