Apparently this function does not return the database name given in the connection string. I tried this on apache 2.x/php4.3.x/pg7.4.x and apache 1.3.x/php5.x/pg8rc1 and saw this behavior on both setups.
(PHP 4, PHP 5, PHP 7, PHP 8)
pg_options — Получение параметров соединения с сервером баз данных
$connection
= ?): string
pg_options() возвращает строку, содержащую параметры
соединения PostgreSQL connection
.
connection
Ресурс подключения к базе данных PostgreSQL. Если параметр
connection
не задан, будет использовано
подключение по умолчанию - последнее соединение, открытое функцией
pg_connect() или pg_pconnect().
Строка, содержащая параметры соединения connection
, либо
false
в случае ошибки.
Пример #1 Пример использования pg_options()
<?php
$pgsql_conn = pg_connect("dbname=mark host=localhost");
echo pg_options($pgsql_conn);
?>
Apparently this function does not return the database name given in the connection string. I tried this on apache 2.x/php4.3.x/pg7.4.x and apache 1.3.x/php5.x/pg8rc1 and saw this behavior on both setups.