Allowing empty hostname when using postgres.

fixes #437