There are many MySQL specific SQL statements in the xmlsitemap_node module. I.e. the function xmlsitemap_node_enable uses a MySQL specific UPDATE statement:

UPDATE {xmlsitemap_node} xn, {node} n
SET xn.previously_changed = xn.last_changed, xn.last_changed = n.changed
WHERE xn.nid = n.nid AND xn.last_changed <> n.changed

for PostgreSQL this should be:

UPDATE {xmlsitemap_node}
SET previously_changed = last_changed, last_changed = n.changed
FROM {node} n
WHERE nid = n.nid AND last_changed <> n.changed

Many statements of that kind can be found in the code and should be reworked. If I find the time I'll provide patches for PostgreSQL.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Darren Oh’s picture

Assigned: Unassigned » Darren Oh
jandd’s picture

Status: Active » Needs review
FileSize
27.93 KB

I created a patch to get all xmlsitemap modules working with PostgreSQL. I couldn't test everything yet. Installation and sitemap creation is now working with PostgreSQL.

Darren Oh’s picture

FileSize
20.93 KB

As far as possible, I'd like to use the same queries on MySQL and PostgreSQL. I've modified some of the queries for this purpose. This patch has been tested on MySQL and needs to be tested on PostgreSQL.

jandd’s picture

FileSize
19.23 KB

the function xmlsitemap_node_enable() contained one invalid PostgreSQL query. I updated your patch to fix this query. All sub modules can be installed now and the sitemap is created properly (at least for my simple test setup)

jandd’s picture

Component: xmlsitemap_node » xmlsitemap
Status: Needs review » Reviewed & tested by the community

I tested the last patch on a larger Drupal 5.3/PostgreSQL installation including Gallery2, xmlsitemap_node and content of different types. I didn't see any problems and in my opinion the patch should be commited to CVS.

Darren Oh’s picture

Status: Reviewed & tested by the community » Fixed

Fixed in CVS commit 90466.

Darren Oh’s picture

Version: 5.x-1.x-dev » 5.x-1.3
Anonymous’s picture

Status: Fixed » Closed (fixed)

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