Re: BUG #2246: Only call pg_fe_getauthname if none given - Mailing list pgsql-patches

From Stephen Frost
Subject Re: BUG #2246: Only call pg_fe_getauthname if none given
Date
Msg-id 20060215200526.GM4474@ns.snowman.net
Whole thread Raw
In response to Re: BUG #2246: Only call pg_fe_getauthname if none given  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #2246: Only call pg_fe_getauthname if none given  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> This is probably not a good idea --- changing the API behavior in
> pursuit of saving a few cycles is just going to get people mad at us.

Fair enough.

> I think we'd have to refactor the code so that PQsetdbLogin gets a
> PQconninfoOption array, overrides values *in that array*, then calls the
> fallback-substitution code etc.  Not sure if it's worth the trouble.
> The extra complexity of searching the array for values to override could
> eat up the cycles we're hoping to save, too :-(

Perhaps I'm missing something obvious (and if so, I'm sorry) but
couldn't we just build up the character array in PQsetdbLogin to be
passed in to connectOptions1?  If we do that we could probably also
merge the two connectOptions...  That would simplify things a great deal
I think and would also avoid the extra processing to pick up the
'defaults'...

    Stephen

Attachment

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #2246: Only call pg_fe_getauthname if none given
Next
From: Tom Lane
Date:
Subject: Re: BUG #2246: Only call pg_fe_getauthname if none given