"undefined function pg_pconnect()" when connecting to Postgres from CodeIgniter
$db['default'] = array(
    'dsn'   =&gt; '',
    'hostname' =&gt; 'pgsql:host=localhost;dbname=Absences_DB',
    'username' =&gt; 'postgres',
    'password' =&gt; 'XXX',
    'database' =&gt; 'Absences_DB',
    'dbdriver' =&gt; 'pdo',
    'dbprefix' =&gt; '',
    'pconnect' =&gt; FALSE,
    'db_debug' =&gt; (ENVIRONMENT !== 'production'),
    'cache_on' =&gt; FALSE,
    'cachedir' =&gt; '',
    'char_set' =&gt; 'utf8',
    'dbcollat' =&gt; 'utf8_general_ci',
    'swap_pre' =&gt; '',
    'encrypt' =&gt; FALSE,
    'compress' =&gt; FALSE,
    'stricton' =&gt; FALSE,
    'failover' =&gt; array(),
    'save_queries' =&gt; TRUE
);


Make sure you have the PDO driver enabled in PHP.