RE: Allow escape in application_name

Поиск
Список
Период
Сортировка
От kuroda.hayato@fujitsu.com
Тема RE: Allow escape in application_name
Дата
Msg-id TYAPR01MB5866684DFB90784D2EE0BDB4F56E9@TYAPR01MB5866.jpnprd01.prod.outlook.com
обсуждение исходный текст
Ответ на Re: Allow escape in application_name  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Ответы Re: Allow escape in application_name  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Список pgsql-hackers
Dear Horiguchi-san

Thank you for giving comments! I attached new patches.

> > +                    if (appname == NULL)
> > +                        appname = "[unknown]";
> > +                    if (username == NULL || *username
> == '\0')
> > +                        username = "[unknown]";
> > +                    if (dbname == NULL || *dbname ==
> '\0')
> > +                        dbname =  "[unknown]";
> >
> > I'm still not sure why these are necessary. Could you clarify that?
>
> It probably comes from my request, just for safety for uncertain
> future.  They are actually not needed under the current usage of the
> function, so *I* would not object to removing them if you are strongly
> feel them out of place.  In that case, since NULL's leads to SEGV
> outright, we would even not need assertions instead.

Yeah, I followed your suggestion. But we deiced to keep codes clean,
hence I removed the if-statements.

Best Regards,
Hayato Kuroda
FUJITSU LIMITED


Вложения

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

Предыдущее
От: "曾文旌(义从)"
Дата:
Сообщение: 回复:Re: Is it worth pushing conditions to sublink/subplan?
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Alter all tables in schema owner fix