Skip site navigation (1) Skip section navigation (2)

Re: libpq and auth type

From: Ludek Finstrle <luf(at)pzkagis(dot)cz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: libpq and auth type
Date: 2006-01-11 16:33:21
Message-ID: 20060111163321.GA31142@soptik.pzkagis.cz (view raw or flat)
Thread:
Lists: pgsql-interfaces
Wed, Jan 11, 2006 at 11:21:55AM -0500, Tom Lane napsal(a):
> Ludek Finstrle <luf(at)pzkagis(dot)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.

I need to determine when the dialog box may show and when not.

> 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 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.

It seems I have to do it by parsing error from additional connect.
I wanted to be sure.

Thanks a lot,

Luf

In response to

pgsql-interfaces by date

Next:From: Magnus HaganderDate: 2006-01-11 18:25:29
Subject: Re: libpq and auth type
Previous:From: Tom LaneDate: 2006-01-11 16:21:55
Subject: Re: libpq and auth type

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group