|
3 | 3 | *
|
4 | 4 | * Copyright 2000 by PostgreSQL Global Development Group
|
5 | 5 | *
|
6 |
| - * $Header: /cvsroot/pgsql/src/bin/psql/help.c,v 1.67 2002/12/12 21:02:24 momjian Exp $ |
| 6 | + * $Header: /cvsroot/pgsql/src/bin/psql/help.c,v 1.68 2002/12/13 22:17:57 momjian Exp $ |
7 | 7 | */
|
8 | 8 | #include"postgres_fe.h"
|
9 | 9 | #include"common.h"
|
@@ -172,79 +172,78 @@ slashUsage(unsigned short int pager)
|
172 | 172 | * fit in 80 columns >> "
|
173 | 173 | */
|
174 | 174 | fprintf(output,_("General\n"));
|
175 |
| -fprintf(output,_(" \\c[onnect] [DBNAME|- [USER]]\n" |
| 175 | +fprintf(output,_("\\c[onnect] [DBNAME|- [USER]]\n" |
176 | 176 | " connect to new database (currently \"%s\")\n"),
|
177 | 177 | PQdb(pset.db));
|
178 |
| -fprintf(output,_(" \\q quit psql\n")); |
179 |
| -fprintf(output,_(" \\h [NAME] help on syntax of SQL commands, * for all commands\n")); |
180 |
| -fprintf(output,_(" \\copyright show PostgreSQL usage and distribution terms\n")); |
181 |
| -fprintf(output,_(" \\cd [DIR] change the current working directory\n")); |
182 |
| -fprintf(output,_(" \\! [COMMAND] execute command in shell or start interactive shell\n")); |
183 |
| -fprintf(output,_(" \\encoding [ENCODING] show or set client encoding\n")); |
184 |
| -fprintf(output,_(" \\set [NAME [VALUE]] set internal variable, or list all if no parameters\n")); |
185 |
| -fprintf(output,_(" \\unset NAME unset (delete) internal variable\n")); |
186 |
| -fprintf(output,_(" \\timing toggle timing of commands (currently %s)\n"), |
| 178 | +fprintf(output,_(" \\cd [DIR] change the current working directory\n")); |
| 179 | +fprintf(output,_(" \\copyright show PostgreSQL usage and distribution terms\n")); |
| 180 | +fprintf(output,_(" \\encoding [ENCODING] show or set client encoding\n")); |
| 181 | +fprintf(output,_(" \\h [NAME] help on syntax of SQL commands, * for all commands\n")); |
| 182 | +fprintf(output,_(" \\q quit psql\n")); |
| 183 | +fprintf(output,_(" \\set [NAME [VALUE]] set internal variable, or list all if no parameters\n")); |
| 184 | +fprintf(output,_(" \\timing toggle timing of commands (currently %s)\n"), |
187 | 185 | ON(pset.timing));
|
| 186 | +fprintf(output,_(" \\unset NAME unset (delete) internal variable\n")); |
| 187 | +fprintf(output,_(" \\! [COMMAND] execute command in shell or start interactive shell\n")); |
188 | 188 | fprintf(output,_("\n"));
|
189 | 189 |
|
190 | 190 | fprintf(output,_("Query Buffer\n"));
|
191 |
| -fprintf(output,_("\\g [FILE]sendquery bufferto server (and results tofile or |pipe)\n")); |
192 |
| -fprintf(output,_("\\r reset (clear) the query buffer\n")); |
193 |
| -fprintf(output,_("\\e [FILE]edit the query buffer (or file) with external editor\n")); |
194 |
| -fprintf(output,_("\\pshow the contents of the query buffer\n")); |
195 |
| -fprintf(output,_("\\w [FILE]write query buffer to file\n")); |
196 |
| -fprintf(output,_("\\s [FILE]display history or save it to file\n")); |
| 191 | +fprintf(output,_(" \\e [FILE]edit thequery buffer(orfile) with external editor\n")); |
| 192 | +fprintf(output,_(" \\g [FILE]send query buffer to server (and results to file or |pipe)\n")); |
| 193 | +fprintf(output,_(" \\p show the contents of the query buffer\n")); |
| 194 | +fprintf(output,_(" \\rreset (clear) the query buffer\n")); |
| 195 | +fprintf(output,_(" \\s [FILE]display history or save it to file\n")); |
| 196 | +fprintf(output,_(" \\w [FILE]write query buffer to file\n")); |
197 | 197 | fprintf(output,_("\n"));
|
198 | 198 |
|
199 |
| -fprintf(output,_("I/O Redirection\n")); |
200 |
| -fprintf(output,_(" \\i FILE execute commands from file\n")); |
201 |
| -fprintf(output,_(" \\o FILE send all query results to file or |pipe\n")); |
| 199 | +fprintf(output,_("Input/Output\n")); |
| 200 | +fprintf(output,_("\\i FILE execute commands from file\n")); |
| 201 | +fprintf(output,_("\\o FILE send all query results to file or |pipe\n")); |
202 | 202 | fprintf(output,_("\n"));
|
203 | 203 |
|
204 | 204 | fprintf(output,_("Informational\n"));
|
205 |
| -fprintf(output,_(" \\d [NAME] describe table, index, sequence, or view\n")); |
206 |
| -fprintf(output,_(" \\d{t|i|s|v|S} [PATTERN] (add \"+\" for more detail)\n" |
207 |
| -" list tables/indexes/sequences/views/system tables\n")); |
208 |
| -fprintf(output,_(" \\da [PATTERN] list aggregate functions\n")); |
209 |
| -fprintf(output,_(" \\dc [PATTERN] list conversions\n")); |
210 |
| -fprintf(output,_(" \\dC list casts\n")); |
211 |
| -fprintf(output,_(" \\dd [PATTERN] show comment for object\n")); |
212 |
| -fprintf(output,_(" \\dD [PATTERN] list domains\n")); |
213 |
| -fprintf(output,_(" \\df [PATTERN] list functions (add \"+\" for more detail)\n")); |
214 |
| -fprintf(output,_(" \\do [NAME] list operators\n")); |
215 |
| -fprintf(output,_(" \\dl list large objects, same as \\lo_list\n")); |
216 |
| -fprintf(output,_(" \\dp [PATTERN] list table access privileges\n")); |
217 |
| -fprintf(output,_(" \\dT [PATTERN] list data types (add \"+\" for more detail)\n")); |
218 |
| -fprintf(output,_(" \\du [PATTERN] list users\n")); |
219 |
| -fprintf(output,_(" \\l list all databases (add \"+\" for more detail)\n")); |
220 |
| -fprintf(output,_(" \\z [PATTERN] list table access privileges (same as \\dp)\n")); |
| 205 | +fprintf(output,_("\\d [NAME] describe table, index, sequence, or view\n")); |
| 206 | +fprintf(output,_("\\d{t|i|s|v|S} [PATTERN] (add \"+\" for more detail)\n" |
| 207 | +"list tables/indexes/sequences/views/system tables\n")); |
| 208 | +fprintf(output,_("\\da [PATTERN] list aggregate functions\n")); |
| 209 | +fprintf(output,_("\\dc [PATTERN] list conversions\n")); |
| 210 | +fprintf(output,_("\\dC list casts\n")); |
| 211 | +fprintf(output,_("\\dd [PATTERN] show comment for object\n")); |
| 212 | +fprintf(output,_("\\dD [PATTERN] list domains\n")); |
| 213 | +fprintf(output,_("\\df [PATTERN] list functions (add \"+\" for more detail)\n")); |
| 214 | +fprintf(output,_("\\do [NAME] list operators\n")); |
| 215 | +fprintf(output,_("\\dl list large objects, same as \\lo_list\n")); |
| 216 | +fprintf(output,_("\\dp [PATTERN] list table access privileges\n")); |
| 217 | +fprintf(output,_("\\dT [PATTERN] list data types (add \"+\" for more detail)\n")); |
| 218 | +fprintf(output,_("\\du [PATTERN] list users\n")); |
| 219 | +fprintf(output,_("\\l list all databases (add \"+\" for more detail)\n")); |
| 220 | +fprintf(output,_("\\z [PATTERN] list table access privileges (same as \\dp)\n")); |
221 | 221 | fprintf(output,_("\n"));
|
222 | 222 |
|
223 | 223 | fprintf(output,_("Formatting\n"));
|
224 |
| -fprintf(output,_(" \\x toggle expanded output (currently %s)\n"), |
225 |
| -ON(pset.popt.topt.expanded)); |
226 |
| -fprintf(output,_(" \\a toggle between unaligned and aligned output mode\n")); |
227 |
| -fprintf(output,_(" \\f [STRING] show or set field separator for unaligned query output\n")); |
228 |
| -fprintf(output,_(" \\pset NAME [VALUE] set table output option\n" |
229 |
| -" (NAME := {format|border|expanded|fieldsep|null|recordsep|\n" |
230 |
| -" tuples_only|title|tableattr|pager})\n")); |
231 |
| -fprintf(output,_(" \\C [STRING] set table title, or unset if none\n")); |
232 |
| -fprintf(output,_(" \\t show only rows (currently %s)\n"), |
233 |
| -ON(pset.popt.topt.tuples_only)); |
234 |
| -fprintf(output,_(" \\echo [STRING] write string to standard output\n")); |
235 |
| -fprintf(output,_(" \\qecho [STRING] write string to query output stream (see \\o)\n")); |
236 |
| -fprintf(output,_(" \\H toggle HTML output mode (currently %s)\n"), |
| 224 | +fprintf(output,_(" \\a toggle between unaligned and aligned output mode\n")); |
| 225 | +fprintf(output,_(" \\C [STRING] set table title, or unset if none\n")); |
| 226 | +fprintf(output,_(" \\echo [STRING] write string to standard output\n")); |
| 227 | +fprintf(output,_(" \\f [STRING] show or set field separator for unaligned query output\n")); |
| 228 | +fprintf(output,_(" \\H toggle HTML output mode (currently %s)\n"), |
237 | 229 | ON(pset.popt.topt.format==PRINT_HTML));
|
238 |
| -fprintf(output,_(" \\T [STRING] set HTML <table> tag attributes, or unset if none\n")); |
| 230 | +fprintf(output,_(" \\pset NAME [VALUE] set table output option\n" |
| 231 | +" (NAME := {format|border|expanded|fieldsep|null|recordsep|\n" |
| 232 | +" tuples_only|title|tableattr|pager})\n")); |
| 233 | +fprintf(output,_(" \\qecho [STRING] write string to query output stream (see \\o)\n")); |
| 234 | +fprintf(output,_(" \\t show only rows (currently %s)\n"), |
| 235 | +ON(pset.popt.topt.tuples_only)); |
| 236 | +fprintf(output,_(" \\T [STRING] set HTML <table> tag attributes, or unset if none\n")); |
| 237 | +fprintf(output,_(" \\x toggle expanded output (currently %s)\n"), |
| 238 | +ON(pset.popt.topt.expanded)); |
239 | 239 | fprintf(output,_("\n"));
|
240 | 240 |
|
241 |
| -fprintf(output,_("Large Object, Copy\n")); |
242 |
| -fprintf(output,_(" \\lo_export\n")); |
243 |
| -fprintf(output,_(" \\lo_import\n")); |
244 |
| -fprintf(output,_(" \\lo_list\n")); |
245 |
| -fprintf(output,_(" \\lo_unlink large object operations\n")); |
246 |
| -fprintf(output,_(" \\copy ... perform SQL COPY with data stream to the client host\n")); |
247 |
| -fprintf(output,_("\n")); |
| 241 | +fprintf(output,_("Copy, Large Object\n")); |
| 242 | +fprintf(output,_(" \\copy ... perform SQL COPY with data stream to the client host\n")); |
| 243 | +fprintf(output,_(" \\lo_export\n")); |
| 244 | +fprintf(output,_(" \\lo_import\n")); |
| 245 | +fprintf(output,_(" \\lo_list\n")); |
| 246 | +fprintf(output,_(" \\lo_unlink large object operations\n")); |
248 | 247 |
|
249 | 248 | if (output!=stdout)
|
250 | 249 | {
|
|