add support for local databases, without a hostname

Useful for PostgreSQL databases, deployed locally.