Since drupal supports mysql, postgresql and ANSI SQL, shouldn't notify?

I've attached a notify.pgsql that could be used in the place of the notify.mysql for postgres databases.

Isaac Vetter
ivetter@math.purdue.edu

DROP TABLE notify;

CREATE TABLE notify (
uid SERIAL,
status smallint NOT NULL default '0',
node smallint NOT NULL default '0',
comment smallint NOT NULL default '0',
attempts int NOT NULL default '0',
teasers int NOT NULL default '0',
CONSTRAINT drupal_notify_id PRIMARY KEY(uid)
);

CommentFileSizeAuthor
#1 notify.inc.diff460 bytesAnonymous (not verified)
notify.pgsql299 bytesAnonymous (not verified)

Comments

Anonymous’s picture

StatusFileSize
new460 bytes

Here's a diff file to replace the mysql-specific 'REPLACE' command in notify.inc that is not standard sql.

Isaac Vetter
ivetter@math.purdue.edu

11c11,12
< db_query('REPLACE {notify} (uid, status, node, teasers, comment) VALUES (%d,
%d, %d, %d, %d)', $user->uid, $edit['status'], $edit['node'], $edit['teasers'], $edit['
comment']);
---
> db_query('DELETE FROM {notify} WHERE uid = %d', $user->uid);
> db_query('INSERT INTO {notify} (uid, status, node, teasers, comment) VALUES (
%d, %d, %d, %d, %d)', $user->uid, $edit['status'], $edit['node'], $edit['teasers'], $ed
it['comment']);

markstos’s picture

Status: Active » Closed (duplicate)

Marking as dupe of 5472. Both this and the other have interesting patches, though.

RobRoy’s picture

Version: 4.2.x-1.x-dev » 4.6.x-1.x-dev
Status: Closed (duplicate) » Closed (fixed)