Re: [PATCH] psql : Improve code for help option

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: miyake_kouta <miyake_kouta(at)oss(dot)nttdata(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] psql : Improve code for help option
Date: 2021-03-02 15:09:18
Message-ID: 88126881-c90e-e3c1-9878-5a1788dec026@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-03-02 15:23:09 Re: psql crash while executing core regression tests
Previous Message Georgios Kokolatos 2021-03-02 15:06:28 Re: GROUP BY DISTINCT