From: Damien R. <dr...@ma...> - 2013-08-20 21:38:46
|
Hi guys, Today I looked at issue #16259 and after testing the proposed patch, I realized that while the fix works fine for MySQL, it breaks PostgreSQL: ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list See my note [1] for further details. While searching for a solution to the issue, I started wondering why filter_api is executing a SELECT DISTINCT in the first place, as it would appear that a normal SELECT should do the job just fine. I can't think of a scenario where the filter query would return more than 1 row per issue, and if there were I think it probably means that we have an improperly-written join. Does anyone know or recall the reason for having the DISTINCT in the first place ? Are there scenarios that I have not thought about where it would be necessary ? D [1] http://www.mantisbt.org/bugs/view.php?id=16259#c37901 |