diff options
| author | Nils Adermann <naderman@naderman.de> | 2012-06-11 15:42:26 -0700 |
|---|---|---|
| committer | Nils Adermann <naderman@naderman.de> | 2012-06-11 15:42:26 -0700 |
| commit | a0771b8814adb504e37749b7c9e4fdc3e21b5ce5 (patch) | |
| tree | d62faeb86c63497c1ba5263a05e7efb65453216c | |
| parent | 5acbf0980dd948c110c8573431b8e08b4a42352a (diff) | |
| parent | 9fa7ab62ad45abf3a5035cc792748893d6cd8a4d (diff) | |
| download | forums-a0771b8814adb504e37749b7c9e4fdc3e21b5ce5.tar forums-a0771b8814adb504e37749b7c9e4fdc3e21b5ce5.tar.gz forums-a0771b8814adb504e37749b7c9e4fdc3e21b5ce5.tar.bz2 forums-a0771b8814adb504e37749b7c9e4fdc3e21b5ce5.tar.xz forums-a0771b8814adb504e37749b7c9e4fdc3e21b5ce5.zip | |
Merge pull request #814 from p/ticket/10828
[ticket/10828] Connect to postgres database by default.
| -rw-r--r-- | tests/test_framework/phpbb_database_test_connection_manager.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test_framework/phpbb_database_test_connection_manager.php b/tests/test_framework/phpbb_database_test_connection_manager.php index c734c90a1a..ae21be6c34 100644 --- a/tests/test_framework/phpbb_database_test_connection_manager.php +++ b/tests/test_framework/phpbb_database_test_connection_manager.php @@ -80,6 +80,21 @@ class phpbb_database_test_connection_manager { $dsn .= ';dbname=' . $this->config['dbname']; } + else if ($this->dbms['PDO'] == 'pgsql') + { + // Postgres always connects to a + // database. If the database is not + // specified here, but the username + // is specified, then connection + // will be to the database named + // as the username. + // + // For greater compatibility, connect + // instead to postgres database which + // should always exist: + // http://www.postgresql.org/docs/9.0/static/manage-ag-templatedbs.html + $dsn .= ';dbname=postgres'; + } break; } |
