Remove redundant getenv() for PGUSER, in psql help.
Previously psql obtained the value of PGUSER twice to display
a default user in its help message.
Author: Kota Miyake
Discussion:
@@ -134,10 +134,7 @@ usage(unsigned short int pager)
fprintf(output, _(" -p, --port=PORT database server port (default: \"%s\")\n"),
env ? env : DEF_PGPORT_STR);
/* Display default user */
- env = getenv("PGUSER");
- if (!env)
- env = user;
- fprintf(output, _(" -U, --username=USERNAME database user name (default: \"%s\")\n"), env);
+ fprintf(output, _(" -U, --username=USERNAME database user name (default: \"%s\")\n"), user);
fprintf(output, _(" -w, --no-password never prompt for password\n"));
fprintf(output, _(" -W, --password force password prompt (should happen automatically)\n"));
