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

Commit0fbde5d

Browse files
committed
Add options and cleanup psql \? and -? help displays
1 parent5a75ad5 commit0fbde5d

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

‎src/bin/psql/help.c

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright 2000 by PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/help.c,v 1.27 2000/05/09 19:08:36 momjian Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/help.c,v 1.28 2000/05/11 01:37:54 momjian Exp $
77
*/
88
#include"postgres.h"
99
#include"help.h"
@@ -104,6 +104,7 @@ usage(void)
104104

105105
puts(" -H HTML table output mode (-P format=html)");
106106
puts(" -l List available databases, then exit");
107+
puts(" -n Disable readline");
107108
puts(" -o <filename> Send query output to filename (or |pipe)");
108109

109110
/* Display default port */
@@ -198,11 +199,13 @@ slashUsage(void)
198199
/* if you add/remove a line here, change the row test above */
199200
fprintf(fout," \\a toggle between unaligned and aligned mode\n");
200201
fprintf(fout," \\c[onnect] [dbname|- [user]]\n"
201-
" connect to new database (currently '%s')\n",PQdb(pset.db));
202+
" connect to new database (currently '%s')\n",PQdb(pset.db));
203+
fprintf(fout," \\C <title> table title\n");
202204
fprintf(fout," \\copy ... perform SQL COPY with data stream to the client machine\n");
203205
fprintf(fout," \\copyright show PostgreSQL usage and distribution terms\n");
204206
fprintf(fout," \\d <table> describe table (or view, index, sequence)\n");
205-
fprintf(fout," \\d{i|s|t|v|S} list only indices/sequences/tables/views/system tables\n");
207+
fprintf(fout," \\d{t|i|s|v} list tables/indices/sequences/views\n");
208+
fprintf(fout," \\d{p|S|l} list permissions/system tables/lobjects\n");
206209
fprintf(fout," \\da list aggregates\n");
207210
fprintf(fout," \\dd [object] list comment for table, type, function, or operator\n");
208211
fprintf(fout," \\df list functions\n");
@@ -219,17 +222,18 @@ slashUsage(void)
219222
fprintf(fout," \\i <file> read and execute queries from <file>\n");
220223
fprintf(fout," \\l list all databases\n");
221224
fprintf(fout," \\lo_export, \\lo_import, \\lo_list, \\lo_unlink\n"
222-
"large object operations\n");
225+
" large object operations\n");
223226
fprintf(fout," \\o [file] send all query results to [file], or |pipe\n");
224227
fprintf(fout," \\p show the content of the current query buffer\n");
225-
fprintf(fout," \\pset {format|border|expanded|fieldsep|recordsep|tuples_only|title|tableattr\n"
226-
"|pager}set table output options\n");
228+
fprintf(fout," \\pset<opt> set table output <opt> ={format|border|expanded|fieldsep|\n"
229+
" null|recordsep|tuples_only|title|tableattr|pager}\n");
227230
fprintf(fout," \\q quit psql\n");
228231
fprintf(fout," \\qecho <text> write text to query output stream (see \\o)\n");
229232
fprintf(fout," \\r reset (clear) the query buffer\n");
230233
fprintf(fout," \\s [file] print history or save it in [file]\n");
231234
fprintf(fout," \\set <var> <value> set internal variable\n");
232235
fprintf(fout," \\t don't show table headers or footers (currently %s)\n",ON(pset.popt.topt.tuples_only));
236+
fprintf(fout," \\T <tags> HTML table tags\n");
233237
fprintf(fout," \\unset <var> unset (delete) internal variable\n");
234238
fprintf(fout," \\w <file> write current query buffer to a <file>\n");
235239
fprintf(fout," \\x toggle expanded output (currently %s)\n",ON(pset.popt.topt.expanded));

‎src/bin/psql/startup.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright 2000 by PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.29 2000/04/12 17:16:23 momjian Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.30 2000/05/11 01:37:54 momjian Exp $
77
*/
88
#include"postgres.h"
99

@@ -314,6 +314,7 @@ parse_psql_options(int argc, char *argv[], struct adhoc_opts * options)
314314
{"host",required_argument,NULL,'h'},
315315
{"html",no_argument,NULL,'H'},
316316
{"list",no_argument,NULL,'l'},
317+
{"noreadline",no_argument,NULL,'n'},
317318
{"output",required_argument,NULL,'o'},
318319
{"port",required_argument,NULL,'p'},
319320
{"pset",required_argument,NULL,'P'},

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp