Last modified: 2014-08-06 16:17:04 UTC
Created attachment 12088 [details] Misc patches to solve postgres-specific issues during installation I've installed mediawiki and smw from the tip of the master branch in git. While installing smw I've encountered multiple problems which I assume is related to the postgres support - I managed to get through the installation process by hacking a bit on the php code. My patches are attached. Here is the revision info: Mediawiki core: commit 3a26db55ab4ba908b76cd9982794d1eeafb4afa0 Merge: 7c9a490 0d086f3 Date: Fri Apr 12 15:02:41 2013 +0000 smw: commit a33907d0aafe817c628e1715b424d3749299f55e Merge: 473ebba 197154e Date: Wed Apr 10 21:29:18 2013 +0000 Problems solved by the patch: 1) Index creation: "CREATE $type $tableName ON $tableName" Obviously this doesn't work very well, particularly when there are more than one index on a table. I've changed to: "CREATE $type $indexName ON $tableName" ... but even that didn't work too well because indexName contained some badly placed double quotes. I changed the index name from "{$tableName}_index{$key}" to "{$rawTableName}_index{$key}" and that solved the issue. 2) There were multiple references to a non-existent sequence smw_ids_smw_id_seq. I did a search'n'replace to smw_object_ids_smw_id_seq and I hope that's correct. 3) Some error message about some variable not beeing a positive non-zero integer. Solved by casting the variable from a string to an int. I have no experience with neither PHP nor smw, and not much experience with mediawiki neither, so obviously this patch needs some serious code review ;-)
Hi! Thanks for your patch! You are welcome to use Developer access https://www.mediawiki.org/wiki/Developer_access to submit this as a Git branch directly into Gerrit: https://www.mediawiki.org/wiki/Git/Tutorial Putting your branch in Git makes it easier to review it quickly. Thanks again! We appreciate your contribution.
I will consider that next time I do bugfixing. I eventually gave up getting smw and semantic maps to work with postgres.
Hi Tobias, I tried uploading your patch to gerrit, but unfortunately, it did not apply cleanly. It's also possible to submit patches using the web-based uploader at https://tools.wmflabs.org/gerrit-patch-uploader . Please use 'Bug: 42241' in the commit message to link it to this bug.
The suggestions made in the patch have been applied to SMW 1.9/SMW 2.0.