Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#4 | xmlsitemap-195124-fix.patch | 19.23 KB | jandd |
#3 | xmlsitemap-195124.patch | 20.93 KB | Darren Oh |
#2 | xmlsitemap-pgsql-compatibility.patch | 27.93 KB | jandd |
Comments
Comment #1
Darren OhComment #2
jandd CreditAttribution: jandd commentedI 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.
Comment #3
Darren OhAs 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.
Comment #4
jandd CreditAttribution: jandd commentedthe 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)
Comment #5
jandd CreditAttribution: jandd commentedI 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.
Comment #6
Darren OhFixed in CVS commit 90466.
Comment #7
Darren OhComment #8
(not verified) CreditAttribution: commentedAutomatically closed -- issue fixed for two weeks with no activity.