Added PostgreSQL support for non-standard ports (Issue #4152).