Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#309 vacation.pl interval check does not work properly on postgresql

v2.3.6
closed-fixed
nobody
Vacation (31)
5
2014-05-27
2014-02-12
Zbyněk Jun
No

sql query checking interval:

$query = qq{SELECT NOW()-notified_at FROM vacation_notification WHERE on_vacation=? AND notified=?};

returns string representation of interval on postgresql while vacational.pl expects integer.

postgres returns expected integer with following query, but it probably breaks mysql.

$query = qq{SELECT extract( epoch from (NOW()-notified_at))::int FROM vacation_notification WHERE on_vacation=? AND notified=?};

Discussion

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,4 +1,3 @@
    -
     sql query checking interval:
    
     $query = qq{SELECT NOW()-notified_at FROM vacation_notification WHERE on_vacation=? AND notified=?};
    
    • status: open --> closed-fixed