diff options
author | mkanat%kerio.com <> | 2005-07-08 11:37:09 +0200 |
---|---|---|
committer | mkanat%kerio.com <> | 2005-07-08 11:37:09 +0200 |
commit | d3bc972289d244e2f116e0d25f8d14e59139be09 (patch) | |
tree | 22529bc14d36bf0cd62f6f29fe380e70c8c8111d | |
parent | 0811ac92bf752121208867728aa4629b9eb9c02a (diff) | |
download | bugzilla-d3bc972289d244e2f116e0d25f8d14e59139be09.tar.gz bugzilla-d3bc972289d244e2f116e0d25f8d14e59139be09.tar.xz |
Bug 292768: [PostgreSQL] COALESCE requires both arguments to be of similar types
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=glob, r=dkl, a=justdave
-rw-r--r-- | CGI.pl | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -262,8 +262,13 @@ sub GetBugActivity { $suppwhere = "AND COALESCE(attachments.isprivate, 0) = 0"; } my $query = " - SELECT COALESCE(fielddefs.description, bugs_activity.fieldid), - fielddefs.name, bugs_activity.attach_id, " . + SELECT COALESCE(fielddefs.description, " + # This is a hack - PostgreSQL requires both COALESCE + # arguments to be of the same type, and this is the only + # way supported by both MySQL 3 and PostgreSQL to convert + # an integer to a string. MySQL 4 supports CAST. + . $dbh->sql_string_concat('bugs_activity.fieldid', q{''}) . + "), fielddefs.name, bugs_activity.attach_id, " . $dbh->sql_date_format('bugs_activity.bug_when', '%Y.%m.%d %H:%i:%s') . ", bugs_activity.removed, bugs_activity.added, profiles.login_name FROM bugs_activity |