Starting with PHP 7, on Ubuntu (i.e., 16+), you can run:
`sudo apt-get install php-pgsql`
In order to enable PostgreSQL support,
--with-pgsql[=DIR] is required when you compile
PHP. DIR
is the PostgreSQL base install directory, defaults to
/usr/local/pgsql. If shared object module is
available, PostgreSQL module may be loaded using
extension directive in php.ini or
dl()
function.
Starting with PHP 7, on Ubuntu (i.e., 16+), you can run:
`sudo apt-get install php-pgsql`