Patch submitted by XRevan86
[DB/pgsql.php] Change pg_exec to pg_query
Encouraged by http://php.net/manual/en/function.pg-query.php and enables
improved monitoring by New Relic (https://newrelic.com)
[DB.php] changed count to empty for php7.2
[DB/common.php] change to array cast for php72
From: https://github.com/pear/DB/
Commits: 7d0ddaff, d04a42a5 and ea9fff4a, respectively