Re: [HACKERS] patch src/bin/psql/help.c - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: [HACKERS] patch src/bin/psql/help.c
Date
Msg-id 200306021523.h52FNEe02963@candle.pha.pa.us
Whole thread Raw
List pgsql-patches
Here is a patch to do the suggested renaming.

---------------------------------------------------------------------------

alex avriette wrote:
>
> > Hmm, what does that have to do with the environment variables?
>
> Oh, well, after I read the man page, I realized that it explicitly
> states that PGHOST is either the socket directory or host. I figured
> specifying which options could be fed environment variables was useful.
> It was to me.
>
> > To serve your end, I suppose you could go through the help outputs and
> > replace "database server host" by "database server host or socket
> > directory".
>
> I think I'll do that.
>
> Alex
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
Index: src/bin/pg_dump/pg_dump.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/bin/pg_dump/pg_dump.c,v
retrieving revision 1.331
diff -c -c -r1.331 pg_dump.c
*** src/bin/pg_dump/pg_dump.c    30 May 2003 22:55:15 -0000    1.331
--- src/bin/pg_dump/pg_dump.c    2 Jun 2003 15:03:41 -0000
***************
*** 694,700 ****
               "                           disable triggers during data-only restore\n"));

      printf(_("\nConnection options:\n"));
!     printf(_("  -h, --host=HOSTNAME      database server host name\n"));
      printf(_("  -p, --port=PORT          database server port number\n"));
      printf(_("  -U, --username=NAME      connect as specified database user\n"));
      printf(_("  -W, --password           force password prompt (should happen automatically)\n"));
--- 694,700 ----
               "                           disable triggers during data-only restore\n"));

      printf(_("\nConnection options:\n"));
!     printf(_("  -h, --host=HOSTNAME      database server host or socket directory\n"));
      printf(_("  -p, --port=PORT          database server port number\n"));
      printf(_("  -U, --username=NAME      connect as specified database user\n"));
      printf(_("  -W, --password           force password prompt (should happen automatically)\n"));
Index: src/bin/pg_dump/pg_dumpall.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/bin/pg_dump/pg_dumpall.c,v
retrieving revision 1.20
diff -c -c -r1.20 pg_dumpall.c
*** src/bin/pg_dump/pg_dumpall.c    30 May 2003 23:55:10 -0000    1.20
--- src/bin/pg_dump/pg_dumpall.c    2 Jun 2003 15:03:42 -0000
***************
*** 253,259 ****
      printf(_("  --version                output version information, then exit\n"));

      printf(_("\nConnection options:\n"));
!     printf(_("  -h, --host=HOSTNAME      database server host name\n"));
      printf(_("  -p, --port=PORT          database server port number\n"));
      printf(_("  -U, --username=NAME      connect as specified database user\n"));
      printf(_("  -W, --password           force password prompt (should happen automatically)\n"));
--- 253,259 ----
      printf(_("  --version                output version information, then exit\n"));

      printf(_("\nConnection options:\n"));
!     printf(_("  -h, --host=HOSTNAME      database server host or socket directory\n"));
      printf(_("  -p, --port=PORT          database server port number\n"));
      printf(_("  -U, --username=NAME      connect as specified database user\n"));
      printf(_("  -W, --password           force password prompt (should happen automatically)\n"));
Index: src/bin/pg_dump/pg_restore.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/bin/pg_dump/pg_restore.c,v
retrieving revision 1.45
diff -c -c -r1.45 pg_restore.c
*** src/bin/pg_dump/pg_restore.c    4 Apr 2003 20:42:13 -0000    1.45
--- src/bin/pg_dump/pg_restore.c    2 Jun 2003 15:03:42 -0000
***************
*** 409,415 ****
               "                           disable triggers during data-only restore\n"));

      printf(_("\nConnection options:\n"));
!     printf(_("  -h, --host=HOSTNAME      database server host name\n"));
      printf(_("  -p, --port=PORT          database server port number\n"));
      printf(_("  -U, --username=NAME      connect as specified database user\n"));
      printf(_("  -W, --password           force password prompt (should happen automatically)\n"));
--- 409,415 ----
               "                           disable triggers during data-only restore\n"));

      printf(_("\nConnection options:\n"));
!     printf(_("  -h, --host=HOSTNAME      database server host or socket directory\n"));
      printf(_("  -p, --port=PORT          database server port number\n"));
      printf(_("  -U, --username=NAME      connect as specified database user\n"));
      printf(_("  -W, --password           force password prompt (should happen automatically)\n"));
Index: src/bin/psql/help.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/bin/psql/help.c,v
retrieving revision 1.72
diff -c -c -r1.72 help.c
*** src/bin/psql/help.c    14 Apr 2003 16:23:36 -0000    1.72
--- src/bin/psql/help.c    2 Jun 2003 15:03:43 -0000
***************
*** 123,129 ****
      puts(_("\nConnection options:"));
      /* Display default host */
      env = getenv("PGHOST");
!     printf(_("  -h HOSTNAME     specify database server host (default: %s)\n"),
             env ? env : _("local socket"));
      /* Display default port */
      env = getenv("PGPORT");
--- 123,129 ----
      puts(_("\nConnection options:"));
      /* Display default host */
      env = getenv("PGHOST");
!     printf(_("  -h HOSTNAME     specify database server host or socket directory (default: %s)\n"),
             env ? env : _("local socket"));
      /* Display default port */
      env = getenv("PGPORT");
Index: src/bin/scripts/clusterdb
===================================================================
RCS file: /cvsroot/pgsql-server/src/bin/scripts/clusterdb,v
retrieving revision 1.11
diff -c -c -r1.11 clusterdb
*** src/bin/scripts/clusterdb    14 May 2003 03:26:03 -0000    1.11
--- src/bin/scripts/clusterdb    2 Jun 2003 15:03:43 -0000
***************
*** 123,129 ****
      echo "  --help                    show this help, then exit"
      echo
      echo "Connection options:"
!     echo "  -h, --host=HOSTNAME       database server host"
      echo "  -p, --port=PORT           database server port"
      echo "  -U, --username=USERNAME   user name to connect as"
      echo "  -W, --password            prompt for password"
--- 123,129 ----
      echo "  --help                    show this help, then exit"
      echo
      echo "Connection options:"
!     echo "  -h, --host=HOSTNAME       database server host or socket directory"
      echo "  -p, --port=PORT           database server port"
      echo "  -U, --username=USERNAME   user name to connect as"
      echo "  -W, --password            prompt for password"
Index: src/bin/scripts/createdb.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/bin/scripts/createdb.c,v
retrieving revision 1.2
diff -c -c -r1.2 createdb.c
*** src/bin/scripts/createdb.c    14 May 2003 03:26:03 -0000    1.2
--- src/bin/scripts/createdb.c    2 Jun 2003 15:03:43 -0000
***************
*** 223,229 ****
      printf(_("  --help                    show this help, then exit\n"));
      printf(_("  --version                 output version information, then exit\n"));
      printf(_("\nConnection options:\n"));
!     printf(_("  -h, --host=HOSTNAME       database server host\n"));
      printf(_("  -p, --port=PORT           database server port\n"));
      printf(_("  -U, --username=USERNAME   user name to connect as\n"));
      printf(_("  -W, --password            prompt for password\n"));
--- 223,229 ----
      printf(_("  --help                    show this help, then exit\n"));
      printf(_("  --version                 output version information, then exit\n"));
      printf(_("\nConnection options:\n"));
!     printf(_("  -h, --host=HOSTNAME       database server host or socket directory\n"));
      printf(_("  -p, --port=PORT           database server port\n"));
      printf(_("  -U, --username=USERNAME   user name to connect as\n"));
      printf(_("  -W, --password            prompt for password\n"));
Index: src/bin/scripts/createlang.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/bin/scripts/createlang.c,v
retrieving revision 1.2
diff -c -c -r1.2 createlang.c
*** src/bin/scripts/createlang.c    14 May 2003 03:26:03 -0000    1.2
--- src/bin/scripts/createlang.c    2 Jun 2003 15:03:43 -0000
***************
*** 276,282 ****
      printf(_("  -e, --echo                show the commands being sent to the server\n"));
      printf(_("  -l, --list                show a list of currently installed languages\n"));
      printf(_("  -L, --pglib=DIRECTORY     find language interpreter file in DIRECTORY\n"));
!     printf(_("  -h, --host=HOSTNAME       database server host\n"));
      printf(_("  -p, --port=PORT           database server port\n"));
      printf(_("  -U, --username=USERNAME   user name to connect as\n"));
      printf(_("  -W, --password            prompt for password\n"));
--- 276,282 ----
      printf(_("  -e, --echo                show the commands being sent to the server\n"));
      printf(_("  -l, --list                show a list of currently installed languages\n"));
      printf(_("  -L, --pglib=DIRECTORY     find language interpreter file in DIRECTORY\n"));
!     printf(_("  -h, --host=HOSTNAME       database server host or socket directory\n"));
      printf(_("  -p, --port=PORT           database server port\n"));
      printf(_("  -U, --username=USERNAME   user name to connect as\n"));
      printf(_("  -W, --password            prompt for password\n"));
Index: src/bin/scripts/createuser.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/bin/scripts/createuser.c,v
retrieving revision 1.3
diff -c -c -r1.3 createuser.c
*** src/bin/scripts/createuser.c    27 May 2003 19:36:54 -0000    1.3
--- src/bin/scripts/createuser.c    2 Jun 2003 15:03:43 -0000
***************
*** 248,254 ****
      printf(_("  --help                    show this help, then exit\n"));
      printf(_("  --version                 output version information, then exit\n"));
      printf(_("\nConnection options:\n"));
!     printf(_("  -h, --host=HOSTNAME       database server host\n"));
      printf(_("  -p, --port=PORT           database server port\n"));
      printf(_("  -U, --username=USERNAME   user name to connect as (not the one to create)\n"));
      printf(_("  -W, --password            prompt for password to connect\n"));
--- 248,254 ----
      printf(_("  --help                    show this help, then exit\n"));
      printf(_("  --version                 output version information, then exit\n"));
      printf(_("\nConnection options:\n"));
!     printf(_("  -h, --host=HOSTNAME       database server host or socket directory\n"));
      printf(_("  -p, --port=PORT           database server port\n"));
      printf(_("  -U, --username=USERNAME   user name to connect as (not the one to create)\n"));
      printf(_("  -W, --password            prompt for password to connect\n"));
Index: src/bin/scripts/dropdb.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/bin/scripts/dropdb.c,v
retrieving revision 1.3
diff -c -c -r1.3 dropdb.c
*** src/bin/scripts/dropdb.c    27 May 2003 19:36:54 -0000    1.3
--- src/bin/scripts/dropdb.c    2 Jun 2003 15:03:43 -0000
***************
*** 146,152 ****
      printf(_("  -e, --echo                show the commands being sent to the server\n"));
      printf(_("  -i, --interactive         prompt before deleting anything\n"));
      printf(_("  -q, --quiet               don't write any messages\n"));
!     printf(_("  -h, --host=HOSTNAME       database server host\n"));
      printf(_("  -p, --port=PORT           database server port\n"));
      printf(_("  -U, --username=USERNAME   user name to connect as\n"));
      printf(_("  -W, --password            prompt for password\n"));
--- 146,152 ----
      printf(_("  -e, --echo                show the commands being sent to the server\n"));
      printf(_("  -i, --interactive         prompt before deleting anything\n"));
      printf(_("  -q, --quiet               don't write any messages\n"));
!     printf(_("  -h, --host=HOSTNAME       database server host or socket directory\n"));
      printf(_("  -p, --port=PORT           database server port\n"));
      printf(_("  -U, --username=USERNAME   user name to connect as\n"));
      printf(_("  -W, --password            prompt for password\n"));
Index: src/bin/scripts/droplang.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/bin/scripts/droplang.c,v
retrieving revision 1.2
diff -c -c -r1.2 droplang.c
*** src/bin/scripts/droplang.c    14 May 2003 03:26:03 -0000    1.2
--- src/bin/scripts/droplang.c    2 Jun 2003 15:03:43 -0000
***************
*** 244,250 ****
      printf(_("  -d, --dbname=DBNAME       database to install language in\n"));
      printf(_("  -e, --echo                show the commands being sent to the server\n"));
      printf(_("  -l, --list                show a list of currently installed languages\n"));
!     printf(_("  -h, --host=HOSTNAME       database server host\n"));
      printf(_("  -p, --port=PORT           database server port\n"));
      printf(_("  -U, --username=USERNAME   user name to connect as\n"));
      printf(_("  -W, --password            prompt for password\n"));
--- 244,250 ----
      printf(_("  -d, --dbname=DBNAME       database to install language in\n"));
      printf(_("  -e, --echo                show the commands being sent to the server\n"));
      printf(_("  -l, --list                show a list of currently installed languages\n"));
!     printf(_("  -h, --host=HOSTNAME       database server host or socket directory\n"));
      printf(_("  -p, --port=PORT           database server port\n"));
      printf(_("  -U, --username=USERNAME   user name to connect as\n"));
      printf(_("  -W, --password            prompt for password\n"));
Index: src/bin/scripts/dropuser.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/bin/scripts/dropuser.c,v
retrieving revision 1.3
diff -c -c -r1.3 dropuser.c
*** src/bin/scripts/dropuser.c    27 May 2003 19:36:55 -0000    1.3
--- src/bin/scripts/dropuser.c    2 Jun 2003 15:03:43 -0000
***************
*** 143,152 ****
      printf(_("Usage:\n"));
      printf(_("  %s [OPTION]... [USERNAME]\n"), progname);
      printf(_("\nOptions:\n"));
!     printf(_("  -e, --echo                show the commands being sent to the server\n"));
      printf(_("  -i, --interactive         prompt before deleting anything\n"));
!     printf(_("  -q, --quiet               don't write any messages\n"));
!     printf(_("  -h, --host=HOSTNAME       database server host\n"));
      printf(_("  -p, --port=PORT           database server port\n"));
      printf(_("  -U, --username=USERNAME   user name to connect as (not the one to drop)\n"));
      printf(_("  -W, --password            prompt for password to connect\n"));
--- 143,152 ----
      printf(_("Usage:\n"));
      printf(_("  %s [OPTION]... [USERNAME]\n"), progname);
      printf(_("\nOptions:\n"));
!     printf(_("  -e, --echo                show the commands being sent to the server\n"));
      printf(_("  -i, --interactive         prompt before deleting anything\n"));
!     printf(_("  -q, --quiet               don't write any messages\n"));
!     printf(_("  -h, --host=HOSTNAME       database server host or socket directory\n"));
      printf(_("  -p, --port=PORT           database server port\n"));
      printf(_("  -U, --username=USERNAME   user name to connect as (not the one to drop)\n"));
      printf(_("  -W, --password            prompt for password to connect\n"));
Index: src/bin/scripts/vacuumdb
===================================================================
RCS file: /cvsroot/pgsql-server/src/bin/scripts/vacuumdb,v
retrieving revision 1.27
diff -c -c -r1.27 vacuumdb
*** src/bin/scripts/vacuumdb    14 May 2003 03:26:03 -0000    1.27
--- src/bin/scripts/vacuumdb    2 Jun 2003 15:03:43 -0000
***************
*** 140,146 ****
      echo " --help                           show this help, then exit"
      echo
      echo "Connection options:"
!     echo "  -h, --host=HOSTNAME             database server host"
      echo "  -p, --port=PORT                 database server port"
      echo "  -U, --username=USERNAME         user name to connect as"
      echo "  -W, --password                  prompt for password"
--- 140,146 ----
      echo " --help                           show this help, then exit"
      echo
      echo "Connection options:"
!     echo "  -h, --host=HOSTNAME             database server host or socket directory"
      echo "  -p, --port=PORT                 database server port"
      echo "  -U, --username=USERNAME         user name to connect as"
      echo "  -W, --password                  prompt for password"

pgsql-patches by date:

Previous
From: Joe Conway
Date:
Subject: Re: array support patch phase 1 patch
Next
From: Bruce Momjian
Date:
Subject: Re: SQL99 CREATE TABLE ... (LIKE parent_table)