Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
842f4bcf
Commit
842f4bcf
authored
16 years ago
by
Peter Eisentraut
Browse files
Options
Downloads
Patches
Plain Diff
In the \? output, align the columns consistently.
parent
3e903466
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/bin/psql/help.c
+69
-73
69 additions, 73 deletions
src/bin/psql/help.c
with
69 additions
and
73 deletions
src/bin/psql/help.c
+
69
−
73
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/2
4
1
2:57:31
petere Exp $
* $PostgreSQL: pgsql/src/bin/psql/help.c,v 1.14
3
2009/03/2
5
1
3: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
,
_
(
"
Modifier
s: S = show system objects
+ =
A
dditional detail
\n
"
));
fprintf
(
output
,
_
(
"
\\
l[
+] list
all databas
es
\n
"
));
fprintf
(
output
,
_
(
"
\\
d[S+]
list
table
s
, view
s
,
and
sequence
s
\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 c
onversion
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 f
oreign-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
,
_
(
"
(option
s: S = show system objects
,
+ =
a
dditional 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 c
ast
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 f
unction
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
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment