Last modified: 2014-08-06 16:17:04 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 47180 - postgresql problems and patches
postgresql problems and patches
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
PC Linux
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
Blocks: postgres
  Show dependency treegraph
Reported: 2013-04-12 19:35 UTC by Tobias Brox
Modified: 2014-08-06 16:17 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---

Misc patches to solve postgres-specific issues during installation (3.62 KB, patch)
2013-04-12 19:35 UTC, Tobias Brox

Description Tobias Brox 2013-04-12 19:35:05 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


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 ;-)
Comment 1 Andre Klapper 2013-07-24 10:52:46 UTC
Hi! Thanks for your patch!

You are welcome to use Developer access
to submit this as a Git branch directly into Gerrit:

Putting your branch in Git makes it easier to review it quickly.
Thanks again! We appreciate your contribution.
Comment 2 Tobias Brox 2013-07-24 11:13:47 UTC
I will consider that next time I do bugfixing.

I eventually gave up getting smw and semantic maps to work with postgres.
Comment 3 Merlijn van Deen (test) 2013-10-15 20:37:27 UTC
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 . Please use 'Bug: 42241' in the commit message to link it to this bug.
Comment 4 MWJames 2014-08-06 15:11:44 UTC
The suggestions made in the patch have been applied to SMW 1.9/SMW 2.0.

Note You need to log in before you can comment on or make changes to this bug.