Index: openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs-postgresql.xql,v diff -u -r1.3 -r1.3.2.1 --- openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs-postgresql.xql 14 Jan 2004 17:34:52 -0000 1.3 +++ openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs-postgresql.xql 4 May 2004 04:32:12 -0000 1.3.2.1 @@ -6,23 +6,26 @@ - insert into acs_mail_lite_bounce_notif - (select user_id, 0 as notification_count, - date_trunc('day',current_timestamp-1-:notification_interval) as notification_time + insert into acs_mail_lite_bounce_notif (user_id, + notification_count, notification_time) + select user_id, 0 as notification_count, + date_trunc('day', current_timestamp - to_interval(1 + :notification_interval, 'days')) + as notification_time from acs_mail_lite_bounce - where bounce_count >= :max_bounce_count) + where bounce_count >= :max_bounce_count - select u.user_id, u.email, u.first_names || ' ' u.last_name as name + select u.user_id, u.email, u.first_names || ' ' || u.last_name as name from cc_users u, acs_mail_lite_bounce_notif n where u.user_id = n.user_id and u.email_bouncing_p = 't' - and n.notification_time < current_timestamp - :notification_interval + and n.notification_time < current_timestamp - + to_interval(:notification_interval, 'days') and n.notification_count < :max_notification_count @@ -45,7 +48,8 @@ delete from acs_mail_lite_bounce where user_id in (select user_id from acs_mail_lite_mail_log - where last_mail_date < current_timestamp - :max_days_to_bounce) + where last_mail_date < current_timestamp - + to_interval(:max_days_to_bounce, 'days'))