(PHP 4, PHP 5, PHP 7)
pg_dbname — 获得数据库名
$connection
     ) : string
     pg_dbname() 返回给定 PostgreSQL
     connection 资源的数据库名称。如果
     connection 不是有效的 PostgreSQL 连接资源则返回 FALSE。
    
Example #1 pg_dbname() 例子
<?php
    error_reporting(E_ALL);
    pg_connect("host=localhost port=5432 dbname=mary");
    echo pg_dbname(); // mary
?>