Changeset 9f23f05 in github


Ignore:
Timestamp:
Oct 10, 2008 6:07:46 AM (5 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
9e951be6
Parents:
8e83075
Message:
  • set MDB2's sequence options for postgres only
File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/include/rcube_mdb2.php

    raf7a23d r9f23f05  
    7979    { 
    8080    // Use persistent connections if available 
    81     $dbh = MDB2::connect($dsn, array( 
     81    $db_options = array( 
    8282        'persistent' => $this->db_pconn, 
    8383        'emulate_prepared' => $this->debug_mode, 
    8484        'debug' => $this->debug_mode, 
    8585        'debug_handler' => 'mdb2_debug_handler', 
    86         'disable_smart_seqname' => true,        // for postgresql 
    87         'seqname_format' => '%s',               // for postgresql 
    88         'portability' => MDB2_PORTABILITY_ALL ^ MDB2_PORTABILITY_EMPTY_TO_NULL)); 
     86        'portability' => MDB2_PORTABILITY_ALL ^ MDB2_PORTABILITY_EMPTY_TO_NULL); 
     87 
     88    if ($this->db_provider == 'pgsql') { 
     89        $db_options['disable_smart_seqname'] = true; 
     90        $db_options['seqname_format'] = '%s'; 
     91      } 
     92 
     93    $dbh = MDB2::connect($dsn, $db_options); 
    8994 
    9095    if (MDB2::isError($dbh)) 
Note: See TracChangeset for help on using the changeset viewer.