diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-10-10 10:07:46 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-10-10 10:07:46 +0000 |
| commit | d62d8a700a55714ac52f902bb0ac350c2e2b54bb (patch) | |
| tree | f08158f4acf7e1f60fd0278ad24de8936aaa5dbb /roundcubemail/program/include | |
| parent | 26a349920dd08a6f80b1f528d81b29442e35a1b2 (diff) | |
- set MDB2's sequence options for postgres only
git-svn-id: https://svn.roundcube.net/trunk@1971 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include')
| -rw-r--r-- | roundcubemail/program/include/rcube_mdb2.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/roundcubemail/program/include/rcube_mdb2.php b/roundcubemail/program/include/rcube_mdb2.php index 2deaa416d..eb6cec9c8 100644 --- a/roundcubemail/program/include/rcube_mdb2.php +++ b/roundcubemail/program/include/rcube_mdb2.php @@ -78,14 +78,19 @@ class rcube_mdb2 function dsn_connect($dsn) { // Use persistent connections if available - $dbh = MDB2::connect($dsn, array( + $db_options = array( 'persistent' => $this->db_pconn, 'emulate_prepared' => $this->debug_mode, 'debug' => $this->debug_mode, 'debug_handler' => 'mdb2_debug_handler', - 'disable_smart_seqname' => true, // for postgresql - 'seqname_format' => '%s', // for postgresql - 'portability' => MDB2_PORTABILITY_ALL ^ MDB2_PORTABILITY_EMPTY_TO_NULL)); + 'portability' => MDB2_PORTABILITY_ALL ^ MDB2_PORTABILITY_EMPTY_TO_NULL); + + if ($this->db_provider == 'pgsql') { + $db_options['disable_smart_seqname'] = true; + $db_options['seqname_format'] = '%s'; + } + + $dbh = MDB2::connect($dsn, $db_options); if (MDB2::isError($dbh)) { |
