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