From: Sam Morris Date: Sun, 14 Nov 2010 19:07:00 +0000 (+0100) Subject: Bug 611974: collectstats.pl --regenerate fails with PostgreSQL 8.4.x (sql_from_days... X-Git-Tag: bugzilla-3.6.4~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=006543b22ed1c1540904a67520f08f35abfdf875;p=thirdparty%2Fbugzilla.git Bug 611974: collectstats.pl --regenerate fails with PostgreSQL 8.4.x (sql_from_days() doesn't accept integers as argument) r/a=LpSolit --- diff --git a/Bugzilla/DB/Pg.pm b/Bugzilla/DB/Pg.pm index b31d186bb4..9c785e580a 100644 --- a/Bugzilla/DB/Pg.pm +++ b/Bugzilla/DB/Pg.pm @@ -143,7 +143,7 @@ sub sql_limit { sub sql_from_days { my ($self, $days) = @_; - return "TO_TIMESTAMP(${days}::int, 'J')::date"; + return "TO_TIMESTAMP('$days', 'J')::date"; } sub sql_to_days {