Last modified: 2010-05-15 15:41:17 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 6807 - Dash in username causes error in postgres query during installation
Dash in username causes error in postgres query during installation
Product: MediaWiki
Classification: Unclassified
Installer (Other open bugs)
PC Linux
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
Blocks: postgres
  Show dependency treegraph
Reported: 2006-07-24 20:48 UTC by Sepp Wijnands
Modified: 2010-05-15 15:41 UTC (History)
1 user (show)

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


Description Sepp Wijnands 2006-07-24 20:48:30 UTC
The following error pops-up when trying to install a wiki on a server with a
postgresql db and 'iperform-wiki' as db username.

Setting the search path for user iperform-wiki ...
Warning: pg_query() []: Query failed: ERROR: syntax error at or
near "-" at character 20 in /wiki/includes/DatabasePostgres.php on line 138

Changing the sql statement:
/wiki/includes/DatabasePostgres.php line 138:

$SQL = "ALTER USER $user SET search_path = $path";
$result = pg_query($this->mConn, $SQL);


$SQL = "ALTER USER \"$user\" SET search_path = $path";
$result = pg_query($this->mConn, $SQL);

Seems to fix the problem (using single quotes seems to cause problems also).
Comment 1 Greg Sabino Mullane 2006-07-24 22:17:19 UTC
Fixed in svn, thanks for the report.

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