Try pecl install of php5-pgsql