title: Zend pgsql connection error
body: <p>I get the following error while connecting with zend and pgsql
  earlier my program was in mysql working fine</p>
  
  <pre><code>Array ( [host]     =&gt; localhost 
          [username] =&gt; openerp 
          [password] =&gt; postgresql 
          [dbname]   =&gt; projects_display 
          [adapter]  =&gt; PDO_PGSQL ) 
  </code></pre>
  
  <pre>
  Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[08006] [7] invalid connection option "adapter"' in /var/www/projects/display/display_res/library/Zend/Db/Adapter/Pdo/Abstract.php:129 
  Stack trace: 
  #0 /var/www/projects/display/display_res/library/Zend/Db/Adapter/Pdo/Abstract.php(129): PDO->__construct('pgsql:host=loca...', 'openerp', 'postgresql', Array) 
  #1 /var/www/projects/display/display_res/library/Zend/Db/Adapter/Pdo/Pgsql.php(87): Zend_Db_Adapter_Pdo_Abstract->_connect() 
  #2 /var/www/projects/display/display_res/library/Zend/Db/Adapter/Abstract.php(860): Zend_Db_Adapter_Pdo_Pgsql->_connect() 
  #3 /var/www/projects/display/display_res/library/Zend/Db/Adapter/Pdo/Pgsql.php(171): Zend_Db_Adapter_Abstract->quote('tbl_user_groups') 
  #4 /var/www/projects/display/display_res/library/Zend/Db/Table/Abstract.php(835): Zend_Db_Adapter_Pdo_Pgsql->describeTable('tbl_user_groups', NULL) 
  #5 /var/www/projects/display/display_res/library/Zend/Db/Table/Abstract.php(874): Zend_Db_Table_Abstract->_setupMetadata() 
  #6 /var in /var/www/projects/display/display_res/library/Zend/Db/Adapter/Pdo/Abstract.php on l
  </pre>
  
  <pre><code>protected function _initDb()
  {
  
      $config = $this-&gt;getOptions();
  
      //print_r($config);
      // db stuff here
      $parameters =array(
          'host'     =&gt; $config['resources']['db']['params']['host'],
          'username' =&gt; $config['resources']['db']['params']['username'],
          'password' =&gt; $config['resources']['db']['params']['password'],
          'dbname'   =&gt; $config['resources']['db']['params']['dbname'],
          'adapter'  =&gt; $config['resources']['db']['adapter']
      );
      print_r($parameters);
      echo "&lt;br&gt;";
      try {
          $db = Zend_Db::factory($config['resources']['db']['adapter'], $parameters);
          $db-&gt;getConnection();
      } catch (Zend_Db_Adapter_Exception $e) {
  
      } catch (Zend_Exception $e) { 
      }
      Zend_Db_Table::setDefaultAdapter($db);
  
  
  }
  </code></pre>