When attempting to view the Akismet moderation queue on a site using PostgreSQL an SQL Error is thrown, claiming that the IFNULL function does not exist.

Proposed solution:

Replace the offending IFNULL with COALESCE using a switch statement. Patch included.

CommentFileSizeAuthor
#1 SR Akismet Patch1.17 KBstefanor
akismet_admin.inc_.patch996 bytesClay Dowling

Comments

stefanor’s picture

StatusFileSize
new1.17 KB

Why not just replace the IFNULLs with COALESCE. MySQL supports COALESCE since v3.something.

drewish’s picture

can your provide a link showing that both mysql and pgsql support that?

drewish’s picture

Status: Needs review » Fixed

I found http://dev.mysql.com/doc/refman/4.1/en/comparison-operators.html#functio... which made me feel comfortable with the change.

committed to HEAD and DRUPAL-5.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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