Last Comment Bug 284125 - PostgreSQL cannot call SUM on a boolean (Boolean Charts)
: PostgreSQL cannot call SUM on a boolean (Boolean Charts)
Status: RESOLVED FIXED
:
Product: Bugzilla
Classification: Server Software
Component: Query/Bug List (show other bugs)
: 2.19.2
: All All
: P1 normal (vote)
: Bugzilla 2.20
Assigned To: Tomas Kopal
: default-qa
:
Mentors:
Depends on:
Blocks: bz-postgres
  Show dependency treegraph
 
Reported: 2005-02-28 10:39 PST by Max Kanat-Alexander
Modified: 2005-03-16 22:51 PST (History)
3 users (show)
justdave: approval+
justdave: blocking2.20+
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
V1 (863 bytes, patch)
2005-03-16 15:45 PST, Tomas Kopal
mkanat: review+
Details | Diff | Splinter Review

Description Max Kanat-Alexander 2005-02-28 10:39:53 PST
The boolean charts try to do something like:

SUM(CONCAT(flagtypes_0.name, flags_0.status::varchar) != 'review+')

(That's the boolean chart "Flag is not equal to review+".)

However, PostgreSQL throws an error when you try to do this:

"Function sum(boolean) does not exist"
Comment 1 Max Kanat-Alexander 2005-02-28 12:49:20 PST
Oh, by the way, ignore that "::varchar," that's a local customization. (That's
not in the tip Search.pm.)
Comment 2 Tomas Kopal 2005-03-16 15:45:33 PST
Created attachment 177663 [details] [diff] [review]
V1

It turned out to be simpler than I expected - only one occurence of this
problem in the whole of bugzilla :-).
Comment 3 Max Kanat-Alexander 2005-03-16 16:04:59 PST
Comment on attachment 177663 [details] [diff] [review]
V1

Hey, that's quite a clever fix! :-)
Comment 4 Max Kanat-Alexander 2005-03-16 22:51:18 PST
Checking in Bugzilla/Search.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Search.pm,v  <--  Search.pm
new revision: 1.92; previous revision: 1.91
done

Note You need to log in before you can comment on or make changes to this bug.