On Sat, Mar 8, 2014 at 08:44:34PM -0500, Bruce Momjian wrote:
> [Just getting back to this.]
>
> Agreed. I have developed the attached patch which passes the strdup()
> failure up from pg_fe_getauthname() and maps the failure to
> PQconndefaults(), which is now documented as being memory allocation
> failure.
>
> FYI, there was odd coding in PQconndefaults() where we set local
> variable 'name' to NULL, then we tested to see if it was NULL --- I
> removed that test.
>
> > idea that we're ignoring failure returns from pqGetpwuid/GetUserName?
>
> If we want pqGetpwuid/GetUserName to be a special return value, we would
> need to modify PQconndefaults()'s API, which doesn't seem worth it.
Applied. I added a C comment about why we ignore pqGetpwuid/GetUserName
failures.
-- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB
http://enterprisedb.com
+ Everyone has their own god. +