pg_Port

pg_Port -- Returns the port number

Description

int pg_port(int connection_id);

pg_Port() will return the port number that the given PostgreSQL connection identifier is connected to.