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.

CommentFileSizeAuthor
aggregator.diff775 bytesrbroberts

Comments

mustafau’s picture

I cannot reproduce this error.

mustafau’s picture

Status: Needs review » Fixed

There is no expires column in aggregator_feed table.

Anonymous’s picture

Status: Fixed » Postponed (maintainer needs more info)

So maybe one of the modules you use added the column and you need to move this incident to the correct project.

rbroberts’s picture

Okay, 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.

Anonymous’s picture

Status: Postponed (maintainer needs more info) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.