When attempting to administer RSS feeds, I get the following error:
- warning: pg_query() [function.pg-query]: Query failed: ERROR: column "f.expires" must appear in the GROUP BY clause or be used in an aggregate function in /var/www/www.astrofoto.org/html/includes/database.pgsql.inc on line 125.
- user warning: query: SELECT f.*, COUNT(i.iid) AS items FROM aggregator_feed f LEFT JOIN aggregator_item i ON f.fid = i.fid GROUP BY f.fid, f.title, f.url, f.refresh, f.checked, f.link, f.description, f.etag, f.modified, f.image, f.block ORDER BY f.title in /var/www/www.astrofoto.org/html/includes/database.pgsql.inc on line 144.
The cause can be tracked down to the listed query which just needs additional columns added to the GROUP BY clause. Patch attached; it now works for me.
| Comment | File | Size | Author |
|---|---|---|---|
| aggregator.diff | 775 bytes | rbroberts |
Comments
Comment #1
mustafau commentedI cannot reproduce this error.
Comment #2
mustafau commentedThere is no expires column in aggregator_feed table.
Comment #3
Anonymous (not verified) commentedSo maybe one of the modules you use added the column and you need to move this incident to the correct project.
Comment #4
rbroberts commentedOkay, I never came back to visit this issue until now while upgrading to D6. I suspect thta earnie is right. At some point I almost certainly played with another aggregator (aggregator2?). I deleted the offending columns (data and expires) and the stock aggregator module works fine.
But I have to point out that (at least where I work) doing a "select *" is frowned on. I never really thought much about why until this bit me. The extra columns screw up the group by.
I'd consider this closed (where's the "not a bug" status?)
Thanks.
Comment #5
Anonymous (not verified) commented