Re: Allow escape in application_name
От | Fujii Masao |
---|---|
Тема | Re: Allow escape in application_name |
Дата | |
Msg-id | 8142b1f5-9792-75be-5236-c55e36f37025@oss.nttdata.com обсуждение исходный текст |
Ответ на | RE: Allow escape in application_name ("kuroda.hayato@fujitsu.com" <kuroda.hayato@fujitsu.com>) |
Ответы |
RE: Allow escape in application_name
|
Список | pgsql-hackers |
On 2021/10/04 21:53, kuroda.hayato@fujitsu.com wrote: >> if (*p == '-' ? isdigit(p[1]) : isdigit(p[0])) >> { >> char *endptr; >> padding = strtol(p, &endptr, 10); >> if (p == endptr) >> break; >> p = endptr; >> } >> else >> padding = 0; > > I removed the support function based on your suggestion, > but added some if-statement in order to treats the special case: '%-p'. + else if (*p == '-' ? isdigit(p[1]) : isdigit(p[0])) + { + char *endptr; + padding = strtol(p, &endptr, 10); Maybe isdigit() and strtol() work differently depending on locale setting? If so, I'm afraid that the behavior of this new code would be different from process_log_prefix_padding(). Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION
В списке pgsql-hackers по дате отправления: