Re: Allow escape in application_name
От | Fujii Masao |
---|---|
Тема | Re: Allow escape in application_name |
Дата | |
Msg-id | 3feb44e8-0bee-01bf-986b-75cafa0d506e@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/09/09 21:36, kuroda.hayato@fujitsu.com wrote: > In this case, I expected to use fallback_application_name instead of appname, > but I missed the case where appname was set as a server option. > Maybe we should do continue when buf.data is \0. Yes. + /* + * If the input format is wrong and the string becomes '\0', + * this parameter is no longer used. + * We conitnue searching application_name. + */ + if (values[i] == '\0') + continue; + else + break; We can simplify the code as follows. if (values[i] != '\0') break; > Yeah, and I found that "%+5p" is another example. > Our padding function does not understand plus sign > (and maybe this is the specification of printf()), but strtol() reads. > > I did not fix here because I lost my way. Do we treats these cases > and continue to use strtol(), or use process_padding()? IMO it's better to use process_padding() to process log_line_prefix and postgres_fdw.application in the same way as possible. Which would be less confusing. Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION
В списке pgsql-hackers по дате отправления: