RE: Allow escape in application_name - Mailing list pgsql-hackers

From houzj.fnst@fujitsu.com
Subject RE: Allow escape in application_name
Date
Msg-id OS0PR01MB57160DDB953021E95C9CA4D494D69@OS0PR01MB5716.jpnprd01.prod.outlook.com
Whole thread Raw
In response to RE: Allow escape in application_name  ("kuroda.hayato@fujitsu.com" <kuroda.hayato@fujitsu.com>)
Responses RE: Allow escape in application_name  ("kuroda.hayato@fujitsu.com" <kuroda.hayato@fujitsu.com>)
List 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



pgsql-hackers by date:

Previous
From: "kuroda.hayato@fujitsu.com"
Date:
Subject: RE: Allow escape in application_name
Next
From: Michael Paquier
Date:
Subject: Re: Add jsonlog log_destination for JSON server logs