Hi,

When using Postgres 8.1, I'm unable to create any custom subscriptions.

admin/messaging/customsubs/new

I filled out the required fields with "test", and saved the form. The resulting page had an error:

    * warning: pg_query() [function.pg-query]: Query failed: ERROR: null value in column "module" violates not-null constraint in /vhost/php/drupal_6_9/includes/database.pgsql.inc on line 139.
    * user warning: query: INSERT INTO notifications_custom (type, title, name, description, event_type, weight, required, register, visibility, default_value) VALUES ('custom_test', 'Test', 'Test', '', 'node', 0, 0, 0, 0, 0) in /vhost/php/drupal_6_9/includes/common.inc on line 3425.

The custom subscription fails to save.

It seems there isn't a value being stored in the module column. Not sure if there SHOULD be something saved...

Attached is a patch to set a default to the module column. I've tested it an it seems to work well after this, with subscriptions being saved correctly.

Michael

CommentFileSizeAuthor
notifications_extra-postgres.patch930 bytesmaikeru

Comments

maikeru’s picture

Title: Postgres support - » Postgres support - Creating a custom subscription
danepowell’s picture

Status: Active » Needs review

This looks reasonable - can someone else (preferably using Postgres) please test the patch and report back?

jose reyero’s picture

Status: Needs review » Reviewed & tested by the community

This looks good to me, applied to 4.x
(I don't use pgsql either so I'm happy enough if it doesn't break mysql)

danepowell’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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