RE: Allow escape in application_name

From: "kuroda(dot)hayato(at)fujitsu(dot)com" <kuroda(dot)hayato(at)fujitsu(dot)com>
To: 'Kyotaro Horiguchi' <horikyota(dot)ntt(at)gmail(dot)com>, "masao(dot)fujii(at)oss(dot)nttdata(dot)com" <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
Cc: "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-11-08 13:40:45
Message-ID: TYAPR01MB58669C1F2E9B3F13DE285D9CF5919@TYAPR01MB5866.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dear Horiguchi-san, Fujii-san

Thank you for discussing!

> Isn't it enough to perform this assertion check only once
> at the top of parse_pgfdw_appname()?

Fixed.

> If possible, I'd like to see this change as a separate patch
> and commt it first because this is the description for
> the existing parameter postgres_fdw.application_name.

I attached a small doc patch for this.

> "pgfdw_application_name is set to application_name of a pgfdw
> connection after placeholder conversion, thus the resulting string is
> subject to the same restrictions to application_names.". Maybe
> followed by "If session user name or database name contains non-ascii
> characters, they are replaced by question marks "?"".

This part was also added. Thanks!

> So our current consensus is to remove the padding part
> from postgres_fdw.application_name.

Yeah I removed.

Attached patches are the latest version.

Best Regards,
Hayato Kuroda
FUJITSU LIMITED

Attachment Content-Type Size
v22_0002_allow_escapes.patch application/octet-stream 10.0 KB
v22_0001_update_descriptions.patch application/octet-stream 1.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2021-11-08 14:52:10 Re: refactoring basebackup.c
Previous Message Robert Haas 2021-11-08 13:27:06 Re: removing global variable ThisTimeLineID