Last modified: 2014-04-29 02:37:31 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T62560, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 60560 - [postgres] help message says "-" allowed in db name, but regex doesn't allow it
[postgres] help message says "-" allowed in db name, but regex doesn't allow it
Status: NEW
Product: MediaWiki
Classification: Unclassified
Installer (Other open bugs)
1.23.0
All All
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
: easy
Depends on:
Blocks: postgres
  Show dependency treegraph
 
Reported: 2014-01-29 03:01 UTC by Bawolff (Brian Wolff)
Modified: 2014-04-29 02:37 UTC (History)
1 user (show)

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


Attachments

Description Bawolff (Brian Wolff) 2014-01-29 03:01:14 UTC
Our installer code only allows "-" in mysql db names. However the help message says its allowed for postgress.

Should double check it works in postgress ( http://stackoverflow.com/questions/10216784/what-is-a-valid-postgresql-database-name suggests it does if it is quoted), and should either change the regex or change the help message.

See also bug 25969
Comment 1 Bawolff (Brian Wolff) 2014-01-29 23:27:12 UTC
The hard part of this bug is that someone should actually test that using a db name with a "-" in it actually works with mediawiki.
Comment 2 Jeff Janes 2014-04-29 02:37:31 UTC
After changing the regex, I installed against git HEAD with a PostgreSQL database named "my-wiki", and created and edited pages and uploaded files with no problem.  Same with "my_wiki-".

I also tried "-my_wiki", but that failed to upload files to it.  But I also tried "-my_wiki" against mysql in 1.22.6, and that too failed.

I did not test any extensions.  I assumed that all connections where directed through a single codepath, and so if it worked anywhere it would work everywhere.  But the failure to upload files to databases with leading hyphens contradicts that.  Are there specific extensions I should test?

So my conclusion is that database names with hyphens in them (no matter how unwise they may be) are supported by PostgreSQL just as much as by MySQL.

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


Navigation
Links