Postgres errors on SELECT count ORDER BY
| Project: | Integrated Metatags |
| Version: | 6.x-1.0-beta7 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | fractile81 |
| Status: | active |
Jump to:
Hi
I'm using Integrated Metatags over Postgres (thank you for this wonderful module). Since the installation I've seen these errors on logs
query: SELECT COUNT(*) FROM int_meta_fields WHERE (type = 'page' OR type = '') ORDER BY type ASC, field ASC, name ASC in /var/www/sites/all/modules/int_meta/int_meta.module on line 342.
I tried to run this query 'by hand' at my postgres client and I got the error column "int_meta_fields.type" must appear in the GROUP BY clause or be used in an aggregate function This error disappeared once I deleted the ORDER BY instruction.
Should not the ORDER BY clause be omitted? As we use count() we expect this query provides only one result, then it doesn't make sense to sort it.
Thank you!

#1
First, thanks for trying this out on Postgres and submitting this bug report; I've never used Postgres myself, and I'm glad that the module works (for the most part).
Seeing that query, I'll see what I can do when I get a chance to correct it. No promises on a quick turn-around, but I'll make sure the change gets in for the next release.
Thanks again!
#2
As far as I know, fractile81, the module is working. It adds the configured meta tag into nodes. This makes the bug more strange to me: when I found those errors, I expected a total disaster :)
Thank you very much, again.