Dear all,

This query breaks PostgreSQL support:
query: SELECT n.title, n.nid, n.type, s.reminder_email, s.forwarding_email, e.event_start AS event_start, e.timezone FROM node n INNER JOIN signup s ON s.nid = n.nid INNER JOIN event e ON n.nid = e.nid INNER JOIN event_timezones tz ON e.timezone = tz.timezone WHERE (s.send_reminder = 1) AND (n.type = 'event') AND (('2011-01-29 09:05:03' > ((e.event_start - CASE WHEN tz.is_dst = 1 THEN tz.offset_dst ELSE tz."offset" END) - INTERVAL 's.reminder_days_before days'))) AND (('2011-01-29 09:05:03' <= ((e.event_start - CASE WHEN tz.is_dst = 1 THEN tz.offset_dst ELSE tz."offset" END)))) in /***/sites/all/modules/signup/includes/cron.inc on line 46.

Error: invalid syntax for interval type : « s.reminder_days_before days »

Comments

grub3’s picture

I think the SQL99 syntax is:
interval '23 days'

s.reminder_days_before should be a numeric.

Using s.reminder_days column makes the query ambiguous if there are several values.
Thus PostgreSQL will reject it. This avoids bugs and problems.

Now we need to fetch the value of s.reminder_days_before and inject it in the query.