Re: The problems of PQhost()

Поиск
Список
Период
Сортировка
От Noah Misch
Тема Re: The problems of PQhost()
Дата
Msg-id 20141127184301.GB1215506@tornado.leadboat.com
обсуждение исходный текст
Ответ на Re: The problems of PQhost()  (Fujii Masao <masao.fujii@gmail.com>)
Ответы Re: The problems of PQhost()
Список pgsql-hackers
On Fri, Nov 28, 2014 at 03:11:06AM +0900, Fujii Masao wrote:
> On Thu, Nov 27, 2014 at 12:38 PM, Noah Misch <noah@leadboat.com> wrote:
> > Sure.  I'll first issue "git revert 9f80f48", then apply the attached patch.
> > Since libpq ignores a hostaddr parameter equal to the empty string, this
> > implementation does likewise.  Apart from that, I anticipate behavior
> > identical to today's code.
> 
> +                fprintf(stderr, _("out of memory\n"));
> 
> psql_error() should be used instead of fprintf()?

I copied what pg_malloc() would do.  Either way seems reasonable.

> +            if (host == NULL)    /* can't happen */
> 
> Is this comment true? ISTM that "host" can be NULL when the default socket
> directory is used, i.e., neither host nor hostaddr are supplied by the user.

Right; I will adjust accordingly.  Thanks.



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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: [BUGS] BUG #12071: Stat collector went crasy (50MB/s constant writes)
Следующее
От: Tom Lane
Дата:
Сообщение: Marginal performance improvement: replace bms_first_member loops