什么是PostgreSQL相当于MYSQL_ATTR_INIT_COMMAND?

时间:2013-12-16 10:49:34

标签: php postgresql zend-framework2

使用zend2目前我使用(mysql)但我将改为使用postgres

代码:

 <?php
return array(
   'db' => array(
      'driver'         => 'Pdo',
      'dsn'            => 'pgsql:dbname=sample;host=127.0.0.1',
      'driver_options' => array(
         PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES UTF8'
      ),
   ),
   'service_manager' => array(
      'factories' => array(
         'Zend\Db\Adapter\Adapter' => 'Zend\Db\Adapter\AdapterServiceFactory'
      ),
   ),

    'module_layouts' => array(
       'Application' => 'layout/layout.phtml',
       'Admin' => 'layout/layout.phtml',
   ),

);

是否有PostgreSQL等效的

 PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8")?

0 个答案:

没有答案