Hi Aron
I think you need to fix some problematic syntax like line 916 of feedapi.module:

$old_vid = db_result(db_query("SELECT vid FROM {feedapi} WHERE nid = %d GROUP BY nid HAVING vid = MAX(vid)", $node->nid));

this fails to complete the save of the node because the lookup fails, so when you edit a feed node and change the URL it will fail to update, this is due to the strict nature if aggregate functions in PG.
I must change the code and add the VID as a group by element to solve the issue like so,

$old_vid = db_result(db_query("SELECT vid FROM {feedapi} WHERE nid = %d GROUP BY nid,vid HAVING vid = MAX(vid)", $node->nid));

If this does not break the other SQLs or change the results, I would love to see this fixed in your next version if Possible.
Thanks Muchly
Franco

Comments

aron novak’s picture

$old_vid = db_result(db_query_range("SELECT vid FROM {feedapi} WHERE nid = %d ORDER BY vid DESC", $node->nid, 0, 1));

I suggest this, it's much simplier. The old query is overy complex.

aron novak’s picture

Status: Active » Needs review
StatusFileSize
new853 bytes

Here is the patch also.
spydmobile: Can you confirm that it works?

aron novak’s picture

Version: 6.x-1.7-beta1 » 6.x-1.x-dev
Status: Needs review » Fixed

Tested under pgsql, committed.

Status: Fixed » Closed (fixed)

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