Last modified: 2012-08-04 20:49: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 11952 - DatabasePostgres.php does not quote all schema names
DatabasePostgres.php does not quote all schema names
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
Blocks: postgres
  Show dependency treegraph
Reported: 2007-11-12 14:13 UTC by Jutta Horstmann
Modified: 2012-08-04 20:49 UTC (History)
2 users (show)

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

Necessary changes to DatabasePostgres.php (598 bytes, patch)
2007-11-12 14:13 UTC, Jutta Horstmann

Description Jutta Horstmann 2007-11-12 14:13:32 UTC
Created attachment 4332 [details]
Necessary changes to DatabasePostgres.php

To support schema names containing dashes (like "my-cool-schema"), the schema name has to be double-quoted in SQL statements.
Throughout DatabasePostgres.php this is done by using the quote_ident() function.

But there is one missing spot: In setup_database(), while testing the writeability of the schema, 
$wgDBmwschema is used unquoted in SQL statements, leading to errors.

The diff is attached.

Comment 1 Greg Sabino Mullane 2007-12-06 17:56:17 UTC
Thanks, applied patch plus some other similar problems in r28214

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