From 598f0d1a8db925cdb235d401554f1a403f506358 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Fri, 23 Dec 2005 10:01:51 +0000 Subject: Bug 316971: [PostgreSQL] ./collectstats.pl --regenerate fails - Patch by Frédéric Buclin r=mkanat a=justdave MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bugzilla/DB/Mysql.pm | 6 ++++++ Bugzilla/DB/Pg.pm | 6 ++++++ 2 files changed, 12 insertions(+) (limited to 'Bugzilla/DB') diff --git a/Bugzilla/DB/Mysql.pm b/Bugzilla/DB/Mysql.pm index 71bb97588..c006e5fd0 100644 --- a/Bugzilla/DB/Mysql.pm +++ b/Bugzilla/DB/Mysql.pm @@ -133,6 +133,12 @@ sub sql_istring { return $string; } +sub sql_from_days { + my ($self, $days) = @_; + + return "FROM_DAYS($days)"; +} + sub sql_to_days { my ($self, $date) = @_; diff --git a/Bugzilla/DB/Pg.pm b/Bugzilla/DB/Pg.pm index 4424e65fd..a8f54f903 100644 --- a/Bugzilla/DB/Pg.pm +++ b/Bugzilla/DB/Pg.pm @@ -111,6 +111,12 @@ sub sql_limit { } } +sub sql_from_days { + my ($self, $days) = @_; + + return "TO_TIMESTAMP(${days}::int, 'J')::date"; +} + sub sql_to_days { my ($self, $date) = @_; -- cgit v1.2.3-24-g4f1b