Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit842f4bc

Browse files
committed
In the \? output, align the columns consistently.
1 parent3e90346 commit842f4bc

File tree

1 file changed

+69
-73
lines changed

1 file changed

+69
-73
lines changed

‎src/bin/psql/help.c

Lines changed: 69 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2009, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/help.c,v 1.142 2009/03/24 12:57:31 petere Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/help.c,v 1.143 2009/03/25 13:14:17 petere Exp $
77
*/
88
#include"postgres_fe.h"
99

@@ -85,7 +85,7 @@ usage(void)
8585

8686
printf(_("psql is the PostgreSQL interactive terminal.\n\n"));
8787
printf(_("Usage:\n"));
88-
printf(_(" psql [OPTIONS]... [DBNAME [USERNAME]]\n\n"));
88+
printf(_(" psql [OPTION]... [DBNAME [USERNAME]]\n\n"));
8989

9090
printf(_("General options:\n"));
9191
/* Display default database */
@@ -166,110 +166,106 @@ slashUsage(unsigned short int pager)
166166

167167
/* if you add/remove a line here, change the row count above */
168168

169-
/*
170-
* if this " is the start of the string then it ought to end there to fit
171-
* in 80 columns >> "
172-
*/
173169
fprintf(output,_("General\n"));
174-
fprintf(output,_(" \\copyright show PostgreSQL usage and distribution terms\n"));
175-
fprintf(output,_(" \\g [FILE] or ; execute query (and send results to file or |pipe)\n"));
176-
fprintf(output,_(" \\h [NAME] help on syntax of SQL commands, * for all commands\n"));
177-
fprintf(output,_(" \\q quit psql\n"));
170+
fprintf(output,_(" \\copyrightshow PostgreSQL usage and distribution terms\n"));
171+
fprintf(output,_(" \\g [FILE] or ;execute query (and send results to file or |pipe)\n"));
172+
fprintf(output,_(" \\h [NAME]help on syntax of SQL commands, * for all commands\n"));
173+
fprintf(output,_(" \\qquit psql\n"));
178174
fprintf(output,"\n");
179175

180176
fprintf(output,_("Query Buffer\n"));
181-
fprintf(output,_(" \\e [FILE] edit the query buffer (or file) with external editor\n"));
182-
fprintf(output,_(" \\p show the contents of the query buffer\n"));
183-
fprintf(output,_(" \\r reset (clear) the query buffer\n"));
177+
fprintf(output,_(" \\e [FILE]edit the query buffer (or file) with external editor\n"));
178+
fprintf(output,_(" \\pshow the contents of the query buffer\n"));
179+
fprintf(output,_(" \\rreset (clear) the query buffer\n"));
184180
#ifdefUSE_READLINE
185-
fprintf(output,_(" \\s [FILE] display history or save it to file\n"));
181+
fprintf(output,_(" \\s [FILE]display history or save it to file\n"));
186182
#endif
187-
fprintf(output,_(" \\w FILE write query buffer to file\n"));
183+
fprintf(output,_(" \\w FILEwrite query buffer to file\n"));
188184
fprintf(output,"\n");
189185

190186
fprintf(output,_("Input/Output\n"));
191-
fprintf(output,_(" \\copy ... perform SQL COPY with data stream to the client host\n"));
192-
fprintf(output,_(" \\echo [STRING] write string to standard output\n"));
193-
fprintf(output,_(" \\i FILE execute commands from file\n"));
194-
fprintf(output,_(" \\o [FILE] send all query results to file or |pipe\n"));
195-
fprintf(output,_(" \\qecho [STRING] write string to query output stream (see \\o)\n"));
187+
fprintf(output,_(" \\copy ...perform SQL COPY with data stream to the client host\n"));
188+
fprintf(output,_(" \\echo [STRING]write string to standard output\n"));
189+
fprintf(output,_(" \\i FILEexecute commands from file\n"));
190+
fprintf(output,_(" \\o [FILE]send all query results to file or |pipe\n"));
191+
fprintf(output,_(" \\qecho [STRING]write string to query output stream (see \\o)\n"));
196192
fprintf(output,"\n");
197193

198194
fprintf(output,_("Informational\n"));
199-
fprintf(output,_("Modifiers: S = show system objects+ =Additional detail\n"));
200-
fprintf(output,_(" \\l[+] listall databases\n"));
201-
fprintf(output,_(" \\d[S+] list tables, views, and sequences\n"));
202-
fprintf(output,_(" \\d[S+] NAME describe table, view, sequence, or index\n"));
203-
fprintf(output,_(" \\da[S][PATTERN]list aggregate functions\n"));
204-
fprintf(output,_(" \\db[+][PATTERN] listtablespaces\n"));
205-
fprintf(output,_(" \\dc[S] [PATTERN] listconversions\n"));
206-
fprintf(output,_(" \\dC[PATTERN] list casts\n"));
207-
fprintf(output,_(" \\dd[S][PATTERN]show comments on objects\n"));
208-
fprintf(output,_(" \\dD[S][PATTERN] listdomains\n"));
209-
fprintf(output,_(" \\des[+][PATTERN] listforeign servers\n"));
210-
fprintf(output,_(" \\deu[+][PATTERN] listuser mappings\n"));
211-
fprintf(output,_(" \\dew[+][PATTERN]list foreign-data wrappers\n"));
212-
fprintf(output,_(" \\df[S+] [PATTERN] listfunctions\n"));
213-
fprintf(output,_(" \\dF[+][PATTERN] list text searchconfigurations\n"));
214-
fprintf(output,_(" \\dFd[+][PATTERN] list text searchdictionaries\n"));
215-
fprintf(output,_(" \\dFp[+][PATTERN] list text searchparsers\n"));
216-
fprintf(output,_(" \\dFt[+][PATTERN]list text search templates\n"));
217-
fprintf(output,_(" \\dg[PATTERN]list roles (groups)\n"));
218-
fprintf(output,_(" \\di[S+] [PATTERN] listindexes\n"));
219-
fprintf(output,_(" \\dllistlarge objects, same as \\lo_list\n"));
220-
fprintf(output,_(" \\dn[+][PATTERN] listschemas\n"));
221-
fprintf(output,_(" \\do[S] [PATTERN] listoperators\n"));
222-
fprintf(output,_(" \\dp[PATTERN]list table, view, and sequence access privileges\n"));
223-
fprintf(output,_(" \\z[PATTERN]same as \\dp\n"));
224-
fprintf(output,_(" \\ds[S+][PATTERN] listsequences\n"));
225-
fprintf(output,_(" \\dt[S+][PATTERN] listtables\n"));
226-
fprintf(output,_(" \\dT[S+][PATTERN]list data types\n"));
227-
fprintf(output,_(" \\du[PATTERN] listroles (users)\n"));
228-
fprintf(output,_(" \\dv[S+][PATTERN]list views\n"));
195+
fprintf(output,_("(options: S = show system objects,+ =additional detail)\n"));
196+
fprintf(output,_(" \\d[S+] listtables, views, and sequences\n"));
197+
fprintf(output,_(" \\d[S+]NAMEdescribe table, view, sequence, or index\n"));
198+
fprintf(output,_(" \\da[S][PATTERN]list aggregate functions\n"));
199+
fprintf(output,_(" \\db[+] [PATTERN] list tablespaces\n"));
200+
fprintf(output,_(" \\dc[S] [PATTERN]listconversions\n"));
201+
fprintf(output,_(" \\dC[PATTERN]listcasts\n"));
202+
fprintf(output,_(" \\dd[S] [PATTERN] show comments on objects\n"));
203+
fprintf(output,_(" \\dD[S] [PATTERN] list domains\n"));
204+
fprintf(output,_(" \\des[+][PATTERN]listforeign servers\n"));
205+
fprintf(output,_(" \\deu[+] [PATTERN]listuser mappings\n"));
206+
fprintf(output,_(" \\dew[+] [PATTERN]listforeign-data wrappers\n"));
207+
fprintf(output,_(" \\df[S+] [PATTERN] list functions\n"));
208+
fprintf(output,_(" \\dF[+] [PATTERN]listtext search configurations\n"));
209+
fprintf(output,_(" \\dFd[+] [PATTERN]list text searchdictionaries\n"));
210+
fprintf(output,_(" \\dFp[+] [PATTERN]list text searchparsers\n"));
211+
fprintf(output,_(" \\dFt[+] [PATTERN]list text searchtemplates\n"));
212+
fprintf(output,_(" \\dg[PATTERN] list roles (groups)\n"));
213+
fprintf(output,_(" \\di[S+][PATTERN] list indexes\n"));
214+
fprintf(output,_(" \\dllistlarge objects, same as \\lo_list\n"));
215+
fprintf(output,_(" \\dn[+] [PATTERN] listschemas\n"));
216+
fprintf(output,_(" \\do[S] [PATTERN]listoperators\n"));
217+
fprintf(output,_(" \\dp[PATTERN]listtable, view, and sequence access privileges\n"));
218+
fprintf(output,_(" \\ds[S+][PATTERN] list sequences\n"));
219+
fprintf(output,_("\\dt[S+][PATTERN] list tables\n"));
220+
fprintf(output,_(" \\dT[S+] [PATTERN]listdata types\n"));
221+
fprintf(output,_(" \\du[PATTERN]listroles (users)\n"));
222+
fprintf(output,_(" \\dv[S+] [PATTERN] list views\n"));
223+
fprintf(output,_(" \\l[+]listall databases\n"));
224+
fprintf(output,_(" \\z[PATTERN] same as \\dp\n"));
229225
fprintf(output,"\n");
230226

231227
fprintf(output,_("Formatting\n"));
232-
fprintf(output,_(" \\a toggle between unaligned and aligned output mode\n"));
233-
fprintf(output,_(" \\C [STRING] set table title, or unset if none\n"));
234-
fprintf(output,_(" \\f [STRING] show or set field separator for unaligned query output\n"));
235-
fprintf(output,_(" \\H toggle HTML output mode (currently %s)\n"),
228+
fprintf(output,_(" \\atoggle between unaligned and aligned output mode\n"));
229+
fprintf(output,_(" \\C [STRING]set table title, or unset if none\n"));
230+
fprintf(output,_(" \\f [STRING]show or set field separator for unaligned query output\n"));
231+
fprintf(output,_(" \\Htoggle HTML output mode (currently %s)\n"),
236232
ON(pset.popt.topt.format==PRINT_HTML));
237-
fprintf(output,_(" \\pset NAME [VALUE] set table output option\n"
238-
" (NAME := {format|border|expanded|fieldsep|footer|null|\n"
239-
" numericlocale|recordsep|tuples_only|title|tableattr|pager})\n"));
240-
fprintf(output,_(" \\t [on|off] show only rows (currently %s)\n"),
233+
fprintf(output,_(" \\pset NAME [VALUE]set table output option\n"
234+
"(NAME := {format|border|expanded|fieldsep|footer|null|\n"
235+
"numericlocale|recordsep|tuples_only|title|tableattr|pager})\n"));
236+
fprintf(output,_(" \\t [on|off]show only rows (currently %s)\n"),
241237
ON(pset.popt.topt.tuples_only));
242-
fprintf(output,_(" \\T [STRING] set HTML <table> tag attributes, or unset if none\n"));
243-
fprintf(output,_(" \\x [on|off] toggle expanded output (currently %s)\n"),
238+
fprintf(output,_(" \\T [STRING]set HTML <table> tag attributes, or unset if none\n"));
239+
fprintf(output,_(" \\x [on|off]toggle expanded output (currently %s)\n"),
244240
ON(pset.popt.topt.expanded));
245241
fprintf(output,"\n");
246242

247243
fprintf(output,_("Connection\n"));
248244
fprintf(output,_(" \\c[onnect] [DBNAME|- USER|- HOST|- PORT|-]\n"
249-
" connect to new database (currently \"%s\")\n"),
245+
" connect to new database (currently \"%s\")\n"),
250246
PQdb(pset.db));
251-
fprintf(output,_(" \\encoding [ENCODING] show or set client encoding\n"));
252-
fprintf(output,_(" \\password [USERNAME] securely change the password for a user\n"));
247+
fprintf(output,_(" \\encoding [ENCODING]show or set client encoding\n"));
248+
fprintf(output,_(" \\password [USERNAME]securely change the password for a user\n"));
253249
fprintf(output,"\n");
254250

255-
fprintf(output,_("External\n"));
256-
fprintf(output,_(" \\cd [DIR] change the current working directory\n"));
257-
fprintf(output,_(" \\timing [on|off] toggle timing of commands (currently %s)\n"),
251+
fprintf(output,_("Operating System\n"));
252+
fprintf(output,_(" \\cd [DIR]change the current working directory\n"));
253+
fprintf(output,_(" \\timing [on|off]toggle timing of commands (currently %s)\n"),
258254
ON(pset.timing));
259-
fprintf(output,_(" \\! [COMMAND] execute command in shell or start interactive shell\n"));
255+
fprintf(output,_(" \\! [COMMAND]execute command in shell or start interactive shell\n"));
260256
fprintf(output,"\n");
261257

262-
fprintf(output,_("Variable\n"));
263-
fprintf(output,_(" \\prompt [TEXT] NAME prompt user to set internal variable\n"));
264-
fprintf(output,_(" \\set [NAME [VALUE]] set internal variable, or list all if no parameters\n"));
265-
fprintf(output,_(" \\unset NAME unset (delete) internal variable\n"));
258+
fprintf(output,_("Variables\n"));
259+
fprintf(output,_(" \\prompt [TEXT] NAMEprompt user to set internal variable\n"));
260+
fprintf(output,_(" \\set [NAME [VALUE]]set internal variable, or list all if no parameters\n"));
261+
fprintf(output,_(" \\unset NAMEunset (delete) internal variable\n"));
266262
fprintf(output,"\n");
267263

268-
fprintf(output,_("LargeObject\n"));
264+
fprintf(output,_("LargeObjects\n"));
269265
fprintf(output,_(" \\lo_export LOBOID FILE\n"
270266
" \\lo_import FILE [COMMENT]\n"
271267
" \\lo_list\n"
272-
" \\lo_unlink LOBOID large object operations\n"));
268+
" \\lo_unlink LOBOIDlarge object operations\n"));
273269

274270
if (output!=stdout)
275271
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp