pgsql: don't set hostname when local admin auth method is ident
When we use ident authentication (postgres Unix socket peer auth), it doesn't matter if there's a db admin password set.
Since there may be no proper cleanup of $dbc_dbadmpass
(due to previous debconf question runs), we should rather rely on
the auth method, than on a admin password being set.
The error I encountered was the following: I selected admin-auth to be ident, and there was no more password prompt. Still, the setup failed with:
psql: error: connection to server at "localhost" (127.0.0.1), port 5432 failed:
FATAL: password authentication failed for user "postgres" password retrieved from file "/tmp/dbconfig-common.psql_home.I6OqKl/.pgpass"
connection to server at "localhost" (127.0.0.1), port 5432 failed:
where instead it should have used socket authentication.