|
3 | 3 | *
|
4 | 4 | * Copyright (c) 2000-2009, PostgreSQL Global Development Group
|
5 | 5 | *
|
6 |
| - * $PostgreSQL: pgsql/src/bin/psql/help.c,v 1.140 2009/02/26 16:02:38 petere Exp $ |
| 6 | + * $PostgreSQL: pgsql/src/bin/psql/help.c,v 1.141 2009/02/27 09:58:09 petere Exp $ |
7 | 7 | */
|
8 | 8 | #include"postgres_fe.h"
|
9 | 9 |
|
@@ -83,71 +83,72 @@ usage(void)
|
83 | 83 | #endif/* WIN32 */
|
84 | 84 | }
|
85 | 85 |
|
86 |
| -/* >>> If this " is the start of the string then it ought to end there to fit in 80 columns >> " */ |
87 |
| -printf(_("This is psql %s, the PostgreSQL interactive terminal.\n\n"), |
88 |
| -PG_VERSION); |
89 |
| -puts(_("Usage:")); |
90 |
| -puts(_(" psql [OPTIONS]... [DBNAME [USERNAME]]\n")); |
| 86 | +printf(_("psql is the PostgreSQL interactive terminal.\n\n")); |
| 87 | +printf(_("Usage:\n")); |
| 88 | +printf(_(" psql [OPTIONS]... [DBNAME [USERNAME]]\n\n")); |
91 | 89 |
|
92 |
| -puts(_("General options:")); |
| 90 | +printf(_("General options:\n")); |
93 | 91 | /* Display default database */
|
94 | 92 | env=getenv("PGDATABASE");
|
95 | 93 | if (!env)
|
96 | 94 | env=user;
|
97 |
| -puts(_(" -c COMMAND run only single command (SQL or internal) and exit")); |
98 |
| -printf(_(" -d DBNAME database name to connect to (default: \"%s\")\n"),env); |
99 |
| -puts(_(" -f FILENAME execute commands from file, then exit")); |
100 |
| -puts(_(" -l list available databases, then exit")); |
101 |
| -puts(_(" -v NAME=VALUE set psql variable NAME to VALUE")); |
102 |
| -puts(_(" -X do not read startup file (~/.psqlrc)")); |
103 |
| -puts(_(" -1 (\"one\") execute command file as a single transaction")); |
104 |
| -puts(_(" --help show this help, then exit")); |
105 |
| -puts(_(" --version output version information, then exit")); |
106 |
| - |
107 |
| -puts(_("\nInput and output options:")); |
108 |
| -puts(_(" -a echo all input from script")); |
109 |
| -puts(_(" -e echo commands sent to server")); |
110 |
| -puts(_(" -E display queries that internal commands generate")); |
111 |
| -puts(_(" -L FILENAME send session log to file")); |
112 |
| -puts(_(" -n disable enhanced command line editing (readline)")); |
113 |
| -puts(_(" -o FILENAME send query results to file (or |pipe)")); |
114 |
| -puts(_(" -q run quietly (no messages, only query output)")); |
115 |
| -puts(_(" -s single-step mode (confirm each query)")); |
116 |
| -puts(_(" -S single-line mode (end of line terminates SQL command)")); |
117 |
| - |
118 |
| -puts(_("\nOutput format options:")); |
119 |
| -puts(_(" -A unaligned table output mode (-P format=unaligned)")); |
120 |
| -printf(_(" -F STRING set field separator (default: \"%s\") (-P fieldsep=)\n"), |
| 95 | +printf(_(" -c, --command=COMMAND run only single command (SQL or internal) and exit\n")); |
| 96 | +printf(_(" -d, --dbnme=DBNAME database name to connect to (default: \"%s\")\n"),env); |
| 97 | +printf(_(" -f, --file=FILENAME execute commands from file, then exit\n")); |
| 98 | +printf(_(" -l, --list list available databases, then exit\n")); |
| 99 | +printf(_(" -v, --set=, --variable=NAME=VALUE\n" |
| 100 | +" set psql variable NAME to VALUE\n")); |
| 101 | +printf(_(" -X, --no-psqlrc do not read startup file (~/.psqlrc)\n")); |
| 102 | +printf(_(" -1 (\"one\"), --single-transaction\n" |
| 103 | +" execute command file as a single transaction\n")); |
| 104 | +printf(_(" --help show this help, then exit\n")); |
| 105 | +printf(_(" --version output version information, then exit\n")); |
| 106 | + |
| 107 | +printf(_("\nInput and output options:\n")); |
| 108 | +printf(_(" -a, --echo-all echo all input from script\n")); |
| 109 | +printf(_(" -e, --echo-queries echo commands sent to server\n")); |
| 110 | +printf(_(" -E, --echo-hidden display queries that internal commands generate\n")); |
| 111 | +printf(_(" -L, --log-file=FILENAME send session log to file\n")); |
| 112 | +printf(_(" -n, --no-readline disable enhanced command line editing (readline)\n")); |
| 113 | +printf(_(" -o, --output=FILENAME send query results to file (or |pipe)\n")); |
| 114 | +printf(_(" -q, --quiet run quietly (no messages, only query output)\n")); |
| 115 | +printf(_(" -s, --single-step single-step mode (confirm each query)\n")); |
| 116 | +printf(_(" -S, --single-line single-line mode (end of line terminates SQL command)\n")); |
| 117 | + |
| 118 | +printf(_("\nOutput format options:\n")); |
| 119 | +printf(_(" -A, --no-align unaligned table output mode\n")); |
| 120 | +printf(_(" -F, --field-separator=STRING\n" |
| 121 | +" set field separator (default: \"%s\")\n"), |
121 | 122 | DEFAULT_FIELD_SEP);
|
122 |
| -puts(_(" -H HTML table output mode (-P format=html)")); |
123 |
| -puts(_(" -P VAR[=ARG] set printing option VAR to ARG (see \\pset command)")); |
124 |
| -puts(_(" -R STRING set record separator (default: newline) (-P recordsep=)")); |
125 |
| -puts(_(" -t print rows only (-P tuples_only)")); |
126 |
| -puts(_(" -T TEXT set HTML table tag attributes (width, border) (-P tableattr=)")); |
127 |
| -puts(_(" -x turn on expanded table output (-P expanded)")); |
128 |
| - |
129 |
| -puts(_("\nConnection options:")); |
| 123 | +printf(_(" -H, --html HTML table output mode\n")); |
| 124 | +printf(_(" -P, --pset=VAR[=ARG] set printing option VAR to ARG (see \\pset command)\n")); |
| 125 | +printf(_(" -R, --record-separator=STRING\n" |
| 126 | +" set record separator (default: newline)\n")); |
| 127 | +printf(_(" -t, --tuples-only print rows only\n")); |
| 128 | +printf(_(" -T, --table-attr=TEXT set HTML table tag attributes (e.g., width, border)\n")); |
| 129 | +printf(_(" -x, --expanded turn on expanded table output\n")); |
| 130 | + |
| 131 | +printf(_("\nConnection options:\n")); |
130 | 132 | /* Display default host */
|
131 | 133 | env=getenv("PGHOST");
|
132 |
| -printf(_(" -hHOSTNAME database server host or socket directory (default: \"%s\")\n"), |
| 134 | +printf(_(" -h, --host=HOSTNAME database server host or socket directory (default: \"%s\")\n"), |
133 | 135 | env ?env :_("local socket"));
|
134 | 136 | /* Display default port */
|
135 | 137 | env=getenv("PGPORT");
|
136 |
| -printf(_(" -pPORT database server port (default: \"%s\")\n"), |
| 138 | +printf(_(" -p, --port=PORT database server port (default: \"%s\")\n"), |
137 | 139 | env ?env :DEF_PGPORT_STR);
|
138 | 140 | /* Display default user */
|
139 | 141 | env=getenv("PGUSER");
|
140 | 142 | if (!env)
|
141 | 143 | env=user;
|
142 |
| -printf(_(" -U NAME database user name (default: \"%s\")\n"),env); |
143 |
| -puts(_(" -w never prompt for password")); |
144 |
| -puts(_(" -W force password prompt (should happen automatically)")); |
145 |
| - |
146 |
| -puts(_( |
147 |
| -"\nFor more information, type \"\\?\" (for internal commands) or \"\\help\"\n" |
148 |
| -"(for SQL commands) from within psql, or consult the psql section in\n" |
149 |
| -"the PostgreSQL documentation.\n\n" |
150 |
| -"Report bugs to <pgsql-bugs@postgresql.org>.")); |
| 144 | +printf(_(" -U, --username=USERNAME database user name (default: \"%s\")\n"),env); |
| 145 | +printf(_(" -w, --no-password never prompt for password\n")); |
| 146 | +printf(_(" -W, --password force password prompt (should happen automatically)\n")); |
| 147 | + |
| 148 | +printf(_("\nFor more information, type \"\\?\" (for internal commands) or \"\\help\" (for SQL\n" |
| 149 | +"commands) from within psql, or consult the psql section in the PostgreSQL\n" |
| 150 | +"documentation.\n\n")); |
| 151 | +printf(_("Report bugs to <pgsql-bugs@postgresql.org>.\n")); |
151 | 152 | }
|
152 | 153 |
|
153 | 154 |
|
|