> > It's impossible by definition to know whether a password is
> required
> > until you have the host, user, and database names, since
> the server's
>
> User could be specified another way (e.g. kerberos auth
> doesn't need to specify user parameter). It's the biggest problem.
You need the username in the end, when you make the connection. Libpq
makes this work by picking up the logged in user in the OS if nothing is
specified.
Kerberos only requires that the specified username is identical to that
used to log in to the system. (Actually, that's only true for Microsoft
Kerberos. On unix kerberos, you can specify a different username in some
scenarios)
//Magnus