/*
 * call-seq:
 *    conn.port()
 *
 * Returns the connected server port number.
 */
static VALUE
pgconn_port(obj)
  VALUE obj;
{
  char* port = PQport(get_pgconn(obj));
  return INT2NUM(atol(port));
}