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.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | SR Akismet Patch | 1.17 KB | stefanor |
| akismet_admin.inc_.patch | 996 bytes | Clay Dowling |
Comments
Comment #1
stefanor commentedWhy not just replace the IFNULLs with COALESCE. MySQL supports COALESCE since v3.something.
Comment #2
drewish commentedcan your provide a link showing that both mysql and pgsql support that?
Comment #3
drewish commentedI 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.
Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.