RE: Allow escape in application_name
Zhijie Hou (Fujitsu) <houzj.fnst@fujitsu.com>
From: "houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>
To: "kuroda.hayato@fujitsu.com" <kuroda.hayato@fujitsu.com>
Cc: "ikedamsh@oss.nttdata.com" <ikedamsh@oss.nttdata.com>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>, "tgl@sss.pgh.pa.us" <tgl@sss.pgh.pa.us>, 'Fujii Masao' <masao.fujii@oss.nttdata.com>, 'Kyotaro Horiguchi' <horikyota.ntt@gmail.com>
Date: 2021-09-10T03:35:39Z
Lists: pgsql-hackers
From Friday, September 10, 2021 11:24 AM kuroda.hayato@fujitsu.com <kuroda.hayato@fujitsu.com> > > We can simplify the code as follows. > > > > if (values[i] != '\0') > > break; > > Fixed. And type mismatching was also fixed. > > > 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. > > OK, I followed that. Some comments were added above the function. Hi Kuroda-san, I found one minor thing in the patch. + appendStringInfoSpaces(buf, + padding > 0 ? padding : -padding); Is it better to use Abs(padding) here ? Although some existing codes are using " padding > 0 ? padding : -padding ". Best regards, Hou zj
Commits
-
postgres_fdw: Add regression test for postgres_fdw.application_name GUC.
- 353aa01687b5 15.0 landed
-
postgres_fdw: Allow postgres_fdw.application_name to include escape sequences.
- 6e0cb3dec10e 15.0 landed
-
doc: Add note about postgres_fdw.application_name.
- 58e2e6eb67fe 15.0 landed
-
postgres_fdw: Revert unstable tests for postgres_fdw.application_name.
- 98dbef90eb29 15.0 landed
-
postgres_fdw: Allow application_name of remote connection to be set via GUC.
- 449ab6350526 15.0 landed