Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pg_port(3) [php man page]

PG_PORT(3)																PG_PORT(3)

pg_port - Return the port number associated with the connection

SYNOPSIS
int pg_port ([resource $connection]) DESCRIPTION
pg_port(3) returns the port number that the given PostgreSQL $connection resource is connected to. PARAMETERS
o $connection - PostgreSQL database connection resource. When $connection is not present, the default connection is used. The default connection is the last connection made by pg_connect(3) or pg_pconnect(3). RETURN VALUES
An int containing the port number of the database server the $connection is to, or FALSE on error. EXAMPLES
Example #1 pg_port(3) example <?php $pgsql_conn = pg_connect("dbname=mark host=localhost"); if ($pgsql_conn) { print "Successfully connected to port: " . pg_port($pgsql_conn) . "<br/> "; } else { print pg_last_error($pgsql_conn); exit; } ?> PHP Documentation Group PG_PORT(3)

Check Out this Related Man Page

PG_TTY(3)																 PG_TTY(3)

pg_tty - Return the TTY name associated with the connection

SYNOPSIS
string pg_tty ([resource $connection]) DESCRIPTION
pg_tty(3) returns the TTY name that server side debugging output is sent to on the given PostgreSQL $connection resource. Note pg_tty(3) is obsolete, since the server no longer pays attention to the TTY setting, but the function remains for backwards compati- bility. PARAMETERS
o $connection - PostgreSQL database connection resource. When $connection is not present, the default connection is used. The default connection is the last connection made by pg_connect(3) or pg_pconnect(3). RETURN VALUES
A string containing the debug TTY of the $connection, or FALSE on error. EXAMPLES
Example #1 pg_tty(3) example <?php $pgsql_conn = pg_connect("dbname=mark host=localhost"); if ($pgsql_conn) { print "Server debug TTY is: " . pg_tty($pgsql_conn) . "<br/> "; } else { print pg_last_error($pgsql_conn); exit; } ?> PHP Documentation Group PG_TTY(3)
Man Page