From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ludek Finstrle <luf@pzkagis.cz>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: libpq and auth type
Date: Wed, 11 Jan 2006 11:21:55 -0500
Message-ID: <13329.1136996515@sss.pgh.pa.us> (raw)
In-Reply-To: <20060111161115.GB28494@soptik.pzkagis.cz>
References: <20060108085851.GA24997@soptik.pzkagis.cz>
<20060111105020.GA11904@soptik.pzkagis.cz>
<12709.1136992353@sss.pgh.pa.us>
<20060111161115.GB28494@soptik.pzkagis.cz>
Ludek Finstrle <luf@pzkagis.cz> writes:
> There is the problem that I don't know if the parameter is required
> or not (it depends on authentication method: ident, krb, trust doesn't
> require uid, pwd; other auth methods does).
> If I don't want break this behaviour with krb I need to know what
> auth method is used. I don't see another way. Do you?
Why do you have to know whether the parameter is required or not?
If the user enters something, fine, else try to proceed without.
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
pg_hba.conf might well specify different auth methods depending on
the user and/or database name. You could imagine trying to make a
connection the instant you have the first three, and only asking for
a password if you get a "no password supplied" failure, but I think
it'd be simpler to just put up a dialog box with room for all four and
let the user leave the password blank if he thinks he doesn't need it.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: tgl@sss.pgh.pa.us, luf@pzkagis.cz
Subject: Re: libpq and auth type
In-Reply-To: <13329.1136996515@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox