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

From Kyotaro Horiguchi
Subject Re: Allow escape in application_name
Date
Msg-id 20211217.120612.272223393619050796.horikyota.ntt@gmail.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
List pgsql-hackers
At Fri, 17 Dec 2021 02:42:25 +0000, "kuroda.hayato@fujitsu.com" <kuroda.hayato@fujitsu.com> wrote in 
> Dear Fujii-san,
> 
> Sorry I forgot replying your messages.
> 
> > >>             if (strcmp(keywords[i], "application_name") == 0 &&
> > >>                 values[i] != NULL && *(values[i]) != '\0')
> > >
> > > I'm not sure but do we have a case that values[i] becomes NULL
> > > even if keywords[i] is "application_name"?
> > 
> > No for now, I guess. But isn't it safer to check that, too? I also could not find strong
> > reason why that check should be dropped. But you'd like to drop that?
> 
> No, I agreed the new checking. I'm just afraid of my code missing.

FWIW, I don't understand why we care of the case where the function
itself changes its mind to set values[i] to null while we ignore the
possibility that some module at remote is modified so that some global
variables to be NULL.  I don't mind wheter we care for NULLs or not
but I think we should be consistent at least in a single patch.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



pgsql-hackers by date:

Previous
From: "kuroda.hayato@fujitsu.com"
Date:
Subject: RE: Allow escape in application_name
Next
From: Greg Stark
Date:
Subject: Re: WIP: WAL prefetch (another approach)