Thread
Commits
-
Remove redundant getenv() for PGUSER, in psql help.
- 4a4241e15b24 14.0 landed
-
[PATCH] psql : Improve code for help option
miyake_kouta <miyake_kouta@oss.nttdata.com> — 2021-03-02T02:57:37Z
Hi. I found some redundant code in psql/help.c, so I propose a patch to fix it. In the current help.c, the variable "user" is set to the value of $PGUSER (or get_user_name). However, $PGUSER is referenced again in the code that follows. We can replace this part with "user", I think. Regards. -- Kota Miyake
-
Re: [PATCH] psql : Improve code for help option
Fujii Masao <masao.fujii@oss.nttdata.com> — 2021-03-02T15:09:18Z
On 2021/03/02 11:57, miyake_kouta wrote: > Hi. > > I found some redundant code in psql/help.c, so I propose a patch to fix it. > In the current help.c, the variable "user" is set to the value of $PGUSER (or get_user_name). > However, $PGUSER is referenced again in the code that follows. > We can replace this part with "user", I think. Good catch! > fprintf(output, _(" -U, --username=USERNAME database user name (default: \"%s\")\n"), env); We can simplify the code more and remove "env = user" by just using "user" instead of "env" in the above? Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION -
Re: [PATCH] psql : Improve code for help option
miyake_kouta <miyake_kouta@oss.nttdata.com> — 2021-03-03T03:27:11Z
2021-03-03 00:09, Fujii Masao wrote: > We can simplify the code more and remove "env = user" > by just using "user" instead of "env" in the above? Thank you for your comment. I updated my patch and replaced "env" with "user". Please check. Regards. -- Kota Miyake
-
Re: [PATCH] psql : Improve code for help option
Fujii Masao <masao.fujii@oss.nttdata.com> — 2021-03-03T07:39:01Z
On 2021/03/03 12:27, miyake_kouta wrote: > 2021-03-03 00:09, Fujii Masao wrote: >> We can simplify the code more and remove "env = user" >> by just using "user" instead of "env" in the above? > > Thank you for your comment. > I updated my patch and replaced "env" with "user". > Please check. Thanks for updating the patch! LGTM. Barrying any objection, I will commit this patch. Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION
-
Re: [PATCH] psql : Improve code for help option
Nitin Jadhav <nitinjadhavpostgres@gmail.com> — 2021-03-03T08:05:04Z
Hi, I have reviewed the patch and it looks good to me. Thanks and Regards, Nitin Jadhav On Wed, Mar 3, 2021 at 1:09 PM Fujii Masao <masao.fujii@oss.nttdata.com> wrote: > > > On 2021/03/03 12:27, miyake_kouta wrote: > > 2021-03-03 00:09, Fujii Masao wrote: > >> We can simplify the code more and remove "env = user" > >> by just using "user" instead of "env" in the above? > > > > Thank you for your comment. > > I updated my patch and replaced "env" with "user". > > Please check. > > Thanks for updating the patch! > LGTM. Barrying any objection, I will commit this patch. > > Regards, > > -- > Fujii Masao > Advanced Computing Technology Center > Research and Development Headquarters > NTT DATA CORPORATION > > >
-
Re: [PATCH] psql : Improve code for help option
Fujii Masao <masao.fujii@oss.nttdata.com> — 2021-03-04T09:25:31Z
On 2021/03/03 17:05, Nitin Jadhav wrote: > Hi, > > I have reviewed the patch and it looks good to me. Thanks! Pushed. Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION