On 2021/09/09 21:36, [email protected] 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