Bug #16960
closedSQL error with DBAL/PostgreSQL: List or look up reviewed extensions
0%
Description
While "List or look up reviewed extensions":
sqlError ERROR: column "cache_extensions.category" must appear in the GROUP BY clause or be used in an aggregate function:
SELECT count(*) as "cnt" FROM "cache_extensions" WHERE 1 = 1 AND "reviewstate" > 0 AND "state" != 5 AND "lastreviewedversion" > 0 ORDER BY "category", "title"
The ORDER BY clause must also be contained in GROUP BY clause.
Attached patch works for me on PostgreSQL.
typo3-dev 4.1 (svn)
postgresql 8.1.4-6~bpo.1
apache2 2.0.54-5sarge1
php5 5.2.0-8~bpo.2
Firefox/Iceweasel/2.0.0.1
(issue imported from #M4947)
Files
Updated by Martin Kutschker almost 18 years ago
I think the order clause is pointless for the COUNT and it can safely be omitted. The grouping makes no sense.
Updated by Ingmar Schlecht over 17 years ago
Karsten/Masi, can one of you please fix this?
If it's a no-brainer please just commit and send the patch as FYI to the core list.
Thanks!
Ingmar
Updated by Martin Kutschker over 17 years ago
Fixed in SVN (by removing the order clause).