| 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-12-07 09:48:21 |
| Message-ID: | TYAPR01MB5866684DFB90784D2EE0BDB4F56E9@TYAPR01MB5866.jpnprd01.prod.outlook.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Dear Horiguchi-san
Thank you for giving comments! I attached new patches.
> > + if (appname == NULL)
> > + appname = "[unknown]";
> > + if (username == NULL || *username
> == '\0')
> > + username = "[unknown]";
> > + if (dbname == NULL || *dbname ==
> '\0')
> > + dbname = "[unknown]";
> >
> > I'm still not sure why these are necessary. Could you clarify that?
>
> It probably comes from my request, just for safety for uncertain
> future. They are actually not needed under the current usage of the
> function, so *I* would not object to removing them if you are strongly
> feel them out of place. In that case, since NULL's leads to SEGV
> outright, we would even not need assertions instead.
Yeah, I followed your suggestion. But we deiced to keep codes clean,
hence I removed the if-statements.
Best Regards,
Hayato Kuroda
FUJITSU LIMITED
| Attachment | Content-Type | Size |
|---|---|---|
| v23_0001_update_descriptions.patch | application/octet-stream | 1.1 KB |
| v23_0002_allow_escapes.patch | application/octet-stream | 8.8 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Amit Kapila | 2021-12-07 10:00:59 | Re: Alter all tables in schema owner fix |
| Previous Message | 曾文旌 (义从) | 2021-12-07 09:44:35 | 回复:Re: Is it worth pushing conditions to sublink/subplan? |