postgres doesn't understand "INSERT INTO {table} SET field=value......
postgres doesn't like the 'SET' part

the simple fix is removing this:
db_query("INSERT INTO {bot_factoid} SET subject = '%s', is_are = '%s', statement = '%s'", $subject, $is_are, $statement);

and replacing it with this:
db_query("INSERT INTO {bot_factoid} (subject, is_are, statement) VALUES ('%s','%s', '%s')", $subject, $is_are, $statement);

attached is patch.

CommentFileSizeAuthor
bot_factoid.module.patch414 bytesjosh waihi

Comments

josh waihi’s picture

Status: Needs review » Reviewed & tested by the community
josh waihi’s picture

Status: Reviewed & tested by the community » Needs review

could someone please review this?

morbus iff’s picture

I've no problem with it. It'll go in when I have a chance.

morbus iff’s picture

Status: Needs review » Closed (duplicate)

Actually, closing this - it'd be covered under http://drupal.org/node/274888.