Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
842f4bcf
Commit
842f4bcf
authored
Mar 25, 2009
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
In the \? output, align the columns consistently.
parent
3e903466
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
69 additions
and
73 deletions
+69
-73
src/bin/psql/help.c
src/bin/psql/help.c
+69
-73
No files found.
src/bin/psql/help.c
View file @
842f4bcf
...
...
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2009, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/help.c,v 1.14
2 2009/03/24 12:57:31
petere Exp $
* $PostgreSQL: pgsql/src/bin/psql/help.c,v 1.14
3 2009/03/25 13:14:17
petere Exp $
*/
#include "postgres_fe.h"
...
...
@@ -85,7 +85,7 @@ usage(void)
printf
(
_
(
"psql is the PostgreSQL interactive terminal.
\n\n
"
));
printf
(
_
(
"Usage:
\n
"
));
printf
(
_
(
" psql [OPTION
S
]... [DBNAME [USERNAME]]
\n\n
"
));
printf
(
_
(
" psql [OPTION]... [DBNAME [USERNAME]]
\n\n
"
));
printf
(
_
(
"General options:
\n
"
));
/* Display default database */
...
...
@@ -166,110 +166,106 @@ slashUsage(unsigned short int pager)
/* if you add/remove a line here, change the row count above */
/*
* if this " is the start of the string then it ought to end there to fit
* in 80 columns >> "
*/
fprintf
(
output
,
_
(
"General
\n
"
));
fprintf
(
output
,
_
(
"
\\
copyright show PostgreSQL usage and distribution terms
\n
"
));
fprintf
(
output
,
_
(
"
\\
g [FILE] or ; execute query (and send results to file or |pipe)
\n
"
));
fprintf
(
output
,
_
(
"
\\
h [NAME] help on syntax of SQL commands, * for all commands
\n
"
));
fprintf
(
output
,
_
(
"
\\
q quit psql
\n
"
));
fprintf
(
output
,
_
(
"
\\
copyright
show PostgreSQL usage and distribution terms
\n
"
));
fprintf
(
output
,
_
(
"
\\
g [FILE] or ;
execute query (and send results to file or |pipe)
\n
"
));
fprintf
(
output
,
_
(
"
\\
h [NAME]
help on syntax of SQL commands, * for all commands
\n
"
));
fprintf
(
output
,
_
(
"
\\
q
quit psql
\n
"
));
fprintf
(
output
,
"
\n
"
);
fprintf
(
output
,
_
(
"Query Buffer
\n
"
));
fprintf
(
output
,
_
(
"
\\
e [FILE] edit the query buffer (or file) with external editor
\n
"
));
fprintf
(
output
,
_
(
"
\\
p show the contents of the query buffer
\n
"
));
fprintf
(
output
,
_
(
"
\\
r reset (clear) the query buffer
\n
"
));
fprintf
(
output
,
_
(
"
\\
e [FILE]
edit the query buffer (or file) with external editor
\n
"
));
fprintf
(
output
,
_
(
"
\\
p
show the contents of the query buffer
\n
"
));
fprintf
(
output
,
_
(
"
\\
r
reset (clear) the query buffer
\n
"
));
#ifdef USE_READLINE
fprintf
(
output
,
_
(
"
\\
s [FILE] display history or save it to file
\n
"
));
fprintf
(
output
,
_
(
"
\\
s [FILE]
display history or save it to file
\n
"
));
#endif
fprintf
(
output
,
_
(
"
\\
w FILE write query buffer to file
\n
"
));
fprintf
(
output
,
_
(
"
\\
w FILE
write query buffer to file
\n
"
));
fprintf
(
output
,
"
\n
"
);
fprintf
(
output
,
_
(
"Input/Output
\n
"
));
fprintf
(
output
,
_
(
"
\\
copy ... perform SQL COPY with data stream to the client host
\n
"
));
fprintf
(
output
,
_
(
"
\\
echo [STRING] write string to standard output
\n
"
));
fprintf
(
output
,
_
(
"
\\
i FILE execute commands from file
\n
"
));
fprintf
(
output
,
_
(
"
\\
o [FILE] send all query results to file or |pipe
\n
"
));
fprintf
(
output
,
_
(
"
\\
qecho [STRING] write string to query output stream (see
\\
o)
\n
"
));
fprintf
(
output
,
_
(
"
\\
copy ...
perform SQL COPY with data stream to the client host
\n
"
));
fprintf
(
output
,
_
(
"
\\
echo [STRING]
write string to standard output
\n
"
));
fprintf
(
output
,
_
(
"
\\
i FILE
execute commands from file
\n
"
));
fprintf
(
output
,
_
(
"
\\
o [FILE]
send all query results to file or |pipe
\n
"
));
fprintf
(
output
,
_
(
"
\\
qecho [STRING]
write string to query output stream (see
\\
o)
\n
"
));
fprintf
(
output
,
"
\n
"
);
fprintf
(
output
,
_
(
"Informational
\n
"
));
fprintf
(
output
,
_
(
"
Modifiers: S = show system objects + = Additional detail
\n
"
));
fprintf
(
output
,
_
(
"
\\
l[+] list all databas
es
\n
"
));
fprintf
(
output
,
_
(
"
\\
d[S+]
list tables, views, and sequences
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
[S+] NAME describe table, view, sequence, or index
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
a[S] [PATTERN] list aggregate function
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
b[+] [PATTERN] list tablespace
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
c[S] [PATTERN] list conversion
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
C [PATTERN] list cas
ts
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
d[S] [PATTERN] show comments on object
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
D[S] [PATTERN] list domain
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
de
s[+] [PATTERN] list foreign server
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
de
u[+] [PATTERN] list user mapping
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
ew[+] [PATTERN] list foreign-data wrapper
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
f[S+] [PATTERN] list func
tions
\n
"
));
fprintf
(
output
,
_
(
"
\\
dF
[+] [PATTERN] list text search configuration
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
dF
d[+] [PATTERN] list text search dictionarie
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
dF
p[+] [PATTERN] list text search parser
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
Ft[+] [PATTERN] list text search templates
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
g [PATTERN] list roles (groups)
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
i[S+] [PATTERN] list indexes
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
l list large objects, same as
\\
lo_list
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
n[+] [PATTERN] list schema
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
o[S] [PATTERN] list operator
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
p [PATTERN] list table, view, and sequence access privileg
es
\n
"
));
fprintf
(
output
,
_
(
"
\\
z [PATTERN] same as
\\
dp
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
s[S+] [PATTERN] list sequenc
es
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
t[S+] [PATTERN] list tables
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
T[S+] [PATTERN] list data type
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
du [PATTERN] list roles (users)
\n
"
));
fprintf
(
output
,
_
(
"
\\
dv[S+] [PATTERN] list views
\n
"
));
fprintf
(
output
,
_
(
"
(options: S = show system objects, + = additional detail)
\n
"
));
fprintf
(
output
,
_
(
"
\\
d[S+] list tables, views, and sequenc
es
\n
"
));
fprintf
(
output
,
_
(
"
\\
d[S+]
NAME describe table, view, sequence, or index
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
a[S] [PATTERN] list aggregate functions
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
b[+] [PATTERN] list tablespace
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
c[S] [PATTERN] list conversion
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
C [PATTERN] list cast
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
d[S] [PATTERN] show comments on objec
ts
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
D[S] [PATTERN] list domain
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
es[+] [PATTERN] list foreign server
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
de
u[+] [PATTERN] list user mapping
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
de
w[+] [PATTERN] list foreign-data wrapper
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
f[S+] [PATTERN] list function
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
F[+] [PATTERN] list text search configura
tions
\n
"
));
fprintf
(
output
,
_
(
"
\\
dF
d[+] [PATTERN] list text search dictionarie
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
dF
p[+] [PATTERN] list text search parser
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
dF
t[+] [PATTERN] list text search template
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
g [PATTERN] list roles (groups)
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
i[S+] [PATTERN] list indexes
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
l list large objects, same as
\\
lo_list
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
n[+] [PATTERN] list schemas
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
o[S] [PATTERN] list operator
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
p [PATTERN] list table, view, and sequence access privilege
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
s[S+] [PATTERN] list sequenc
es
\n
"
));
fprintf
(
output
,
_
(
"
\\
dt[S+] [PATTERN] list tables
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
T[S+] [PATTERN] list data typ
es
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
u [PATTERN] list roles (users)
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
v[S+] [PATTERN] list view
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
l[+] list all databases
\n
"
));
fprintf
(
output
,
_
(
"
\\
z [PATTERN] same as
\\
dp
\n
"
));
fprintf
(
output
,
"
\n
"
);
fprintf
(
output
,
_
(
"Formatting
\n
"
));
fprintf
(
output
,
_
(
"
\\
a toggle between unaligned and aligned output mode
\n
"
));
fprintf
(
output
,
_
(
"
\\
C [STRING] set table title, or unset if none
\n
"
));
fprintf
(
output
,
_
(
"
\\
f [STRING] show or set field separator for unaligned query output
\n
"
));
fprintf
(
output
,
_
(
"
\\
H toggle HTML output mode (currently %s)
\n
"
),
fprintf
(
output
,
_
(
"
\\
a
toggle between unaligned and aligned output mode
\n
"
));
fprintf
(
output
,
_
(
"
\\
C [STRING]
set table title, or unset if none
\n
"
));
fprintf
(
output
,
_
(
"
\\
f [STRING]
show or set field separator for unaligned query output
\n
"
));
fprintf
(
output
,
_
(
"
\\
H
toggle HTML output mode (currently %s)
\n
"
),
ON
(
pset
.
popt
.
topt
.
format
==
PRINT_HTML
));
fprintf
(
output
,
_
(
"
\\
pset NAME [VALUE] set table output option
\n
"
" (NAME := {format|border|expanded|fieldsep|footer|null|
\n
"
" numericlocale|recordsep|tuples_only|title|tableattr|pager})
\n
"
));
fprintf
(
output
,
_
(
"
\\
t [on|off] show only rows (currently %s)
\n
"
),
fprintf
(
output
,
_
(
"
\\
pset NAME [VALUE]
set table output option
\n
"
"
(NAME := {format|border|expanded|fieldsep|footer|null|
\n
"
"
numericlocale|recordsep|tuples_only|title|tableattr|pager})
\n
"
));
fprintf
(
output
,
_
(
"
\\
t [on|off]
show only rows (currently %s)
\n
"
),
ON
(
pset
.
popt
.
topt
.
tuples_only
));
fprintf
(
output
,
_
(
"
\\
T [STRING] set HTML <table> tag attributes, or unset if none
\n
"
));
fprintf
(
output
,
_
(
"
\\
x [on|off] toggle expanded output (currently %s)
\n
"
),
fprintf
(
output
,
_
(
"
\\
T [STRING]
set HTML <table> tag attributes, or unset if none
\n
"
));
fprintf
(
output
,
_
(
"
\\
x [on|off]
toggle expanded output (currently %s)
\n
"
),
ON
(
pset
.
popt
.
topt
.
expanded
));
fprintf
(
output
,
"
\n
"
);
fprintf
(
output
,
_
(
"Connection
\n
"
));
fprintf
(
output
,
_
(
"
\\
c[onnect] [DBNAME|- USER|- HOST|- PORT|-]
\n
"
"
connect to new database (currently
\"
%s
\"
)
\n
"
),
"
connect to new database (currently
\"
%s
\"
)
\n
"
),
PQdb
(
pset
.
db
));
fprintf
(
output
,
_
(
"
\\
encoding [ENCODING] show or set client encoding
\n
"
));
fprintf
(
output
,
_
(
"
\\
password [USERNAME] securely change the password for a user
\n
"
));
fprintf
(
output
,
_
(
"
\\
encoding [ENCODING]
show or set client encoding
\n
"
));
fprintf
(
output
,
_
(
"
\\
password [USERNAME]
securely change the password for a user
\n
"
));
fprintf
(
output
,
"
\n
"
);
fprintf
(
output
,
_
(
"
External
\n
"
));
fprintf
(
output
,
_
(
"
\\
cd [DIR] change the current working directory
\n
"
));
fprintf
(
output
,
_
(
"
\\
timing [on|off] toggle timing of commands (currently %s)
\n
"
),
fprintf
(
output
,
_
(
"
Operating System
\n
"
));
fprintf
(
output
,
_
(
"
\\
cd [DIR]
change the current working directory
\n
"
));
fprintf
(
output
,
_
(
"
\\
timing [on|off]
toggle timing of commands (currently %s)
\n
"
),
ON
(
pset
.
timing
));
fprintf
(
output
,
_
(
"
\\
! [COMMAND] execute command in shell or start interactive shell
\n
"
));
fprintf
(
output
,
_
(
"
\\
! [COMMAND]
execute command in shell or start interactive shell
\n
"
));
fprintf
(
output
,
"
\n
"
);
fprintf
(
output
,
_
(
"Variable
\n
"
));
fprintf
(
output
,
_
(
"
\\
prompt [TEXT] NAME prompt user to set internal variable
\n
"
));
fprintf
(
output
,
_
(
"
\\
set [NAME [VALUE]] set internal variable, or list all if no parameters
\n
"
));
fprintf
(
output
,
_
(
"
\\
unset NAME unset (delete) internal variable
\n
"
));
fprintf
(
output
,
_
(
"Variable
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
prompt [TEXT] NAME
prompt user to set internal variable
\n
"
));
fprintf
(
output
,
_
(
"
\\
set [NAME [VALUE]]
set internal variable, or list all if no parameters
\n
"
));
fprintf
(
output
,
_
(
"
\\
unset NAME
unset (delete) internal variable
\n
"
));
fprintf
(
output
,
"
\n
"
);
fprintf
(
output
,
_
(
"Large Object
\n
"
));
fprintf
(
output
,
_
(
"Large Object
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
lo_export LOBOID FILE
\n
"
"
\\
lo_import FILE [COMMENT]
\n
"
"
\\
lo_list
\n
"
"
\\
lo_unlink LOBOID large object operations
\n
"
));
"
\\
lo_unlink LOBOID
large object operations
\n
"
));
if
(
output
!=
stdout
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment