pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: miyake_kouta <miyake_kouta@oss.nttdata.com>
To: Pgsql Hackers <pgsql-hackers@postgresql.org>
Subject: Re: [PATCH] psql : Improve code for help option
Date: Wed, 3 Mar 2021 00:09:18 +0900
Message-ID: <88126881-c90e-e3c1-9878-5a1788dec026@oss.nttdata.com> (raw)
In-Reply-To: <2a3c612babdd6ed63a9d877bb575d793@oss.nttdata.com>
References: <2a3c612babdd6ed63a9d877bb575d793@oss.nttdata.com>



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





view thread (6+ messages)  latest in thread

Message-ID: <88126881-c90e-e3c1-9878-5a1788dec026@oss.nttdata.com>
Permalink:  ../88126881-c90e-e3c1-9878-5a1788dec026@oss.nttdata.com/
Also on:    postgresql.org/message-id/88126881-c90e-e3c1-9878-5a1788dec026@oss.nttdata.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: masao.fujii@oss.nttdata.com, miyake_kouta@oss.nttdata.com
  Subject: Re: [PATCH] psql : Improve code for help option
  In-Reply-To: <88126881-c90e-e3c1-9878-5a1788dec026@oss.nttdata.com>
  References: <2a3c612babdd6ed63a9d877bb575d793@oss.nttdata.com> <88126881-c90e-e3c1-9878-5a1788dec026@oss.nttdata.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox