I've been using drupal in pgsql schemas for a year now with no problems. In fact, all of my Drupal sites live in separate schemas of one database, so that they can share data if need be. In my existing settings.php file, I have the following settings:
$db_url = 'pgsql://username:password@localhost/database';
$db_prefix = 'drupal.'; // note the "."
The "." on the end of "drupal" in the db prefix distinguishes it as a schema instead of a regular db prefix. Getting to the point, the installation process for Drupal 5.x doesn't let me to put a "." in my db prefix, so I have to install drupal manually. I wasn't sure if this should be a feature request or a bug, but given the fact that it's a valid prefix for pgsql, I opted for bug. If it isn't a valid prefix for mysql, then maybe it should be rejected if mysql is selected as the database.
Comment | File | Size | Author |
---|---|---|---|
#4 | dot_is_not_allowed_prefix.patch | 1.31 KB | hswong3i |
#1 | dot_is_allowed_prefix.patch | 985 bytes | chx |
Comments
Comment #1
chx CreditAttribution: chx commentedHm, I have some memories doing some tricks with giving a database specifier as prefix for MySQL. Thanks for the bug report.
The patch might use some wording love. But the preg is sound.
Comment #2
Steven CreditAttribution: Steven commentedLet's keep things simple and allow a dot anywhere. Using a dot at the end, you can share tables across databases with mysql.
Committed to HEAD. Thanks.
Comment #3
(not verified) CreditAttribution: commentedComment #4
hswong3i CreditAttribution: hswong3i commentedAccording to the discussion of http://drupal.org/node/371 since #72, maybe we should rollback this change since it is a bit tricky and buggy:
table_prefix_
) replacement only, but not fordatabase_name.table_prefix_
syntax (since tables are not located in same database):database_name.table_prefix_
syntax we have a lot of limitation, e.g. both database must come with identical connection parameters, which result as similar effect of locate all different tables under same database instance:[{tablename}]
will not able to convert as`prefix_tablename`
simply, since it may result as`dbname.prefix_tablename`
(if dot exists in $db_prefix) which is invalid SQL syntax. Even we can revamp prefixTables() for a proper handling, I guess this may not be our expected approach, e.g.:This patch rollback the checking from _install_settings_form_validate(), which close the backdoor of both Drupal and MySQL/PostgreSQL as expected handling. For existing incorrect Drupal site installation, we can propose some upgrade procedure for correction.
Comment #5
Anonymous (not verified) CreditAttribution: Anonymous commentedFile a new report. Reopening a two year old standing closed issue isn't what you should do.
Comment #6
hswong3i CreditAttribution: hswong3i commentedMark duplicated with http://drupal.org/node/302327
Comment #7
Anonymous (not verified) CreditAttribution: Anonymous commentedComment #8
Damien Tournoud CreditAttribution: Damien Tournoud commentedRevert vandalism.