Re: Re: [COMMITTERS] pgsql: libpq: change PQconndefaults() to ignore invalid service files

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Re: [COMMITTERS] pgsql: libpq: change PQconndefaults() to ignore invalid service files
Дата
Msg-id 20140320154905.GC7711@momjian.us
обсуждение исходный текст
Ответ на Re: [COMMITTERS] pgsql: libpq: change PQconndefaults() to ignore invalid service files  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
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. +



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: effective_cache_size cannot be changed by a reload
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Risk Estimation WAS: Planner hints in Postgresql