int pg_connect
(string host, string port, string dbname)
int pg_connect
(string host, string port, string options, string dbname)
int pg_connect
(string host, string port, string options, string tty, string dbname)
int pg_connect
(string conn_string)
成功すると接続インデックスを返し、コネクションが生成できなかった場合は FALSEを返します。この関数は PostgreSQLデータベースへのコネクションを オープンします。引数は引用符で括った文字列とする必要があります。
この関数は、他のPostgreSQL関数を発行する際に必要な接続IDを返しま す。一度に複数のコネクションをオープンすることができます。
以前の構文: $conn = pg_connect ("host", "port", "options", "tty", "dbname") は推奨されません。
pg_pconnect()も参照下さい。