[Rt-commit] r18373 - rt/3.8/trunk/lib/RT/Report
ruz at bestpractical.com
ruz at bestpractical.com
Fri Feb 13 17:04:23 EST 2009
Author: ruz
Date: Fri Feb 13 17:04:23 2009
New Revision: 18373
Modified:
rt/3.8/trunk/lib/RT/Report/Tickets.pm
Log:
* Pg 8.3 requires explicit casting of date types to text
for substring and other functions
Modified: rt/3.8/trunk/lib/RT/Report/Tickets.pm
==============================================================================
--- rt/3.8/trunk/lib/RT/Report/Tickets.pm (original)
+++ rt/3.8/trunk/lib/RT/Report/Tickets.pm Fri Feb 13 17:04:23 2009
@@ -168,6 +168,8 @@
if ($field =~ /^(.*)(Daily|Monthly|Annually)$/) {
my ($field, $grouping) = ($1, $2);
+ # Pg 8.3 requires explicit casting
+ $field .= '::text' if RT->Config->Get('DatabaseType') eq 'Pg';
if ( $grouping =~ /Daily/ ) {
$args{'FUNCTION'} = "SUBSTR($field,1,10)";
}
More information about the Rt-commit
mailing list