(PHP 3, PHP 4 >= 4.0.0)
int pg_port (resource connection)
int pg_port
pg_port() returns the port number that the given PostgreSQL connection resource is connected to.