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

Re: BUG #2246: Only call pg_fe_getauthname if none given

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: BUG #2246: Only call pg_fe_getauthname if none given
Date: 2006-02-15 20:23:38
Message-ID: 19235.1140035018@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-patches
Stephen Frost <sfrost(at)snowman(dot)net> writes:
> 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?

That's a possibility too, though by the time you've finished building
that string (with appropriate quoting) and then tearing it apart again
in conninfo_parse, it's likely that you've eaten the cycles you hoped to
save ... especially since that processing would happen for all uses of
PQsetdbLogin, whether or not they could avoid calling pg_fe_getauthname.

I'm starting to feel that it's not worth messing with, which is
obviously the same conclusion we came to last time round ...

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Gerhard LutzDate: 2006-02-16 13:21:18
Subject: BUG #2265: CREATE TABLE when AUTOCOMMIT is OFF
Previous:From: Andrew KlostermanDate: 2006-02-15 20:14:59
Subject: Re: BUG #2246: Bad malloc interactions: ecpg, openssl

pgsql-patches by date

Next:From: Sergey E. KoposovDate: 2006-02-15 23:35:25
Subject: Re: patch fixing the old RETURN NEXT bug
Previous:From: Andrew KlostermanDate: 2006-02-15 20:14:59
Subject: Re: BUG #2246: Bad malloc interactions: ecpg, openssl

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