В моем файле data.php есть следующая конфигурация подключения по умолчанию.
Код: Выделить всё
$db['newdb'] = array(
'dsn' => 'pgsql:host=192.xxx.x.xxx;port=5432;dbname=dbname',
'hostname' => 'localhost',
'username' => 'username',
'password' => 'password',
'database' => 'dbname',
'dbdriver' => 'pgsql',
'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
);
Код: Выделить всё
Подробнее здесь: [url]https://stackoverflow.com/questions/50974772/invalid-db-driver-when-connecting-postgresql-to-codeigniter-3[/url]