CI 连接 PostgreSQL 数据库

452 阅读1分钟

$db['default'] = array(
    'dsn'	=> '',
    'hostname' => 'pgsql:host=127.0.0.1;port=15400;dbname=your_dbname',
    'username' => 'your_username',
    'password' => 'your_password',
    'database' => 'your_dbname',
    'dbdriver' => 'pdo',
 	'dbprefix' => '',
 	'pconnect' => FALSE,
 	'db_debug' => (ENVIRONMENT !== 'production'),
 	'cache_on' => FALSE,
 	'cachedir' => '',
 	'char_set' => 'utf8',
 	'dbcollat' => 'utf8_general_ci',
 	'swap_pre' => '',
 	'encrypt' => FALSE,
 	'compress' => FALSE,
 	'stricton' => FALSE,
 	'failover' => array(),
 	'save_queries' => TRUE
 );