In spaces_og.module, the following SQL statement is attempted:

db_query("UPDATE {og_access_post} og_p 
          INNER JOIN {og_ancestry} og_a ON og_p.nid = og_a.nid
          INNER JOIN {node} n ON og_p.nid = n.nid
          SET og_public = %d WHERE og_a.group_nid = %d",
          !$private, $node->nid);

That is a mysql-ism, (virtually) no other database supports that -- in particular, Postgres chokes on it. You have to replace it with an update on the table where the condition is set by a subselect, for example (sticking rather close to the original query; the subselect could be simplified by dropping a join):

db_query("UPDATE {og_access_post} SET og_public = %d
          WHERE nid in (
          SELECT og_p.nid FROM {og_access_post} og_p
          INNER JOIN {og_ancestry} og_a ON og_p.nid = og_a.nid
          INNER JOIN {node} n ON og_p.nid = n.nid
          WHERE og_a.group_nid = %d)",
          !$private, $node->nid);

Patch attached.

CommentFileSizeAuthor
spaces_og.module.diff1.69 KBbartl

Comments

liam morland’s picture

Issue tags: +PostgreSQL