| From: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> | 
|---|---|
| To: | Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> | 
| Cc: | "kuroda(dot)hayato(at)fujitsu(dot)com" <kuroda(dot)hayato(at)fujitsu(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>, "ikedamsh(at)oss(dot)nttdata(dot)com" <ikedamsh(at)oss(dot)nttdata(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "tgl(at)sss(dot)pgh(dot)pa(dot)us" <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
| Subject: | Re: Allow escape in application_name | 
| Date: | 2021-12-27 11:18:18 | 
| Message-ID: | CAD21AoBa4Jtvur4VsAV7oQ_2LkphCr8Zc5+VZcZUrf=sji7pEw@mail.gmail.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
On Mon, Dec 27, 2021 at 1:40 PM Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> wrote:
>
>
>
> On 2021/12/27 10:40, kuroda(dot)hayato(at)fujitsu(dot)com wrote:
> > Dear Fujii-san, Horiguchi-san,
> >
> > I confirmed that the feature was committed but reverted the test.
> > Now I'm checking buildfarm.
>
> Attached is the patch that adds the regression test for postgres_fdw.application_name. Could you review this?
>
> As Horiguchi-san suggested at [1], I split the test into two, and then tweaked them as follows.
>
> 1. Set application_name option of a server option to 'fdw_%d%p'
> 2. Set postgres_fdw.application_name to 'fdw_%a%u%%'
>
> 'fdw_%d%p' and 'fdw_%a%u%%' still may be larger than NAMEDATALEN depending on the regression test environment. To make the test stable even in that case, the patch uses substring() is truncate application_name string in the test query's condition to less than NAMEDATALEN.
Good idea. But the application_name is actually truncated to 63
characters (NAMEDATALEN - 1)? If so, we need to do substring(... for
63) instead.
Regards,
--
Masahiko Sawada
EDB:  https://www.enterprisedb.com/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Sascha Kuhl | 2021-12-27 11:23:10 | Re: Add Boolean node | 
| Previous Message | Sascha Kuhl | 2021-12-27 11:13:57 | Re: Add Boolean node |