Although PostgreSQL is officially supported by Drupal, many modules does not work with this (excellent) database.
Comment Notify module is not an exception:
- MySQL specific functions (concat, ifnull) used in install procedure
- MySQL specific "UPDATE table JOIN another_table SET ..." are used too.

Attached patch fixes these problems.
.install rewritten via 'db_type' == pgsql
.module: SQL queries rewriten to UPDATE comment_notify ... WHERE cid in (select cid from comments where...)

Patch attached. Tested only on PostgreSQL 8.3, may be string concatenation in .install should be rewriten with
explicit type casts (have no 7.x and 8.0-8.2 to test with)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

greggles’s picture

Title: PostgreSQL compatibility » PostgreSQL compatibility for Upgrade from 5.x version of Comment Notify
Status: Needs review » Needs work

Thanks for the feedback and patch! Maintaining pgsql support is a major goal of mine in general and with this module.

I think that the fixes you made to the .module file are already included in the latest version because of #336394: Unable to disable notification. Although it doesn't seems we didn't catch it in function comment_notify_unsubscribe_submit()

Could you make those same fixes to the later queries and resubmit the patch?

Thanks!

Alex_Tutubalin’s picture

Yes, one of "UPDATE {comments_notify} cn" is already fixed in -dev version.
Other issues remains.

Attached patch contains diff against 6.x-1.x-dev developmen snapshot (downloaded from module page).

Quick tested on small installation on PostgreSQL 8.3

greggles’s picture

Status: Needs work » Needs review
FileSize
3.33 KB

Here's an alternate which just fixes spacing around the pgsql switch statement in the install and also around a foreach statement in the .module to comply with http://drupal.org/coding-standards

Alex_Tutubalin’s picture

I've saved initial spacing in .install just to 'not to patch' initial line

greggles’s picture

Title: PostgreSQL compatibility for Upgrade from 5.x version of Comment Notify » more PostgreSQL compatibility fixes (install and deleting subscriptions)
Status: Needs review » Fixed

Ok. I appreciate not wanting to change more lines than necessary but coding standards are even more important ;)

Thanks, this has been applied: http://drupal.org/cvs?commit=161346

Status: Fixed » Closed (fixed)

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