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
0fbde5d9
Commit
0fbde5d9
authored
May 11, 2000
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add options and cleanup psql \? and -? help displays
parent
5a75ad55
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
src/bin/psql/help.c
src/bin/psql/help.c
+10
-6
src/bin/psql/startup.c
src/bin/psql/startup.c
+2
-1
No files found.
src/bin/psql/help.c
View file @
0fbde5d9
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
*
*
* Copyright 2000 by PostgreSQL Global Development Group
* Copyright 2000 by PostgreSQL Global Development Group
*
*
* $Header: /cvsroot/pgsql/src/bin/psql/help.c,v 1.2
7 2000/05/09 19:08:36
momjian Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/help.c,v 1.2
8 2000/05/11 01:37:54
momjian Exp $
*/
*/
#include "postgres.h"
#include "postgres.h"
#include "help.h"
#include "help.h"
...
@@ -104,6 +104,7 @@ usage(void)
...
@@ -104,6 +104,7 @@ usage(void)
puts
(
" -H HTML table output mode (-P format=html)"
);
puts
(
" -H HTML table output mode (-P format=html)"
);
puts
(
" -l List available databases, then exit"
);
puts
(
" -l List available databases, then exit"
);
puts
(
" -n Disable readline"
);
puts
(
" -o <filename> Send query output to filename (or |pipe)"
);
puts
(
" -o <filename> Send query output to filename (or |pipe)"
);
/* Display default port */
/* Display default port */
...
@@ -199,10 +200,12 @@ slashUsage(void)
...
@@ -199,10 +200,12 @@ slashUsage(void)
fprintf
(
fout
,
"
\\
a toggle between unaligned and aligned mode
\n
"
);
fprintf
(
fout
,
"
\\
a toggle between unaligned and aligned mode
\n
"
);
fprintf
(
fout
,
"
\\
c[onnect] [dbname|- [user]]
\n
"
fprintf
(
fout
,
"
\\
c[onnect] [dbname|- [user]]
\n
"
" connect to new database (currently '%s')
\n
"
,
PQdb
(
pset
.
db
));
" connect to new database (currently '%s')
\n
"
,
PQdb
(
pset
.
db
));
fprintf
(
fout
,
"
\\
C <title> table title
\n
"
);
fprintf
(
fout
,
"
\\
copy ... perform SQL COPY with data stream to the client machine
\n
"
);
fprintf
(
fout
,
"
\\
copy ... perform SQL COPY with data stream to the client machine
\n
"
);
fprintf
(
fout
,
"
\\
copyright show PostgreSQL usage and distribution terms
\n
"
);
fprintf
(
fout
,
"
\\
copyright show PostgreSQL usage and distribution terms
\n
"
);
fprintf
(
fout
,
"
\\
d <table> describe table (or view, index, sequence)
\n
"
);
fprintf
(
fout
,
"
\\
d <table> describe table (or view, index, sequence)
\n
"
);
fprintf
(
fout
,
"
\\
d{i|s|t|v|S} list only indices/sequences/tables/views/system tables
\n
"
);
fprintf
(
fout
,
"
\\
d{t|i|s|v} list tables/indices/sequences/views
\n
"
);
fprintf
(
fout
,
"
\\
d{p|S|l} list permissions/system tables/lobjects
\n
"
);
fprintf
(
fout
,
"
\\
da list aggregates
\n
"
);
fprintf
(
fout
,
"
\\
da list aggregates
\n
"
);
fprintf
(
fout
,
"
\\
dd [object] list comment for table, type, function, or operator
\n
"
);
fprintf
(
fout
,
"
\\
dd [object] list comment for table, type, function, or operator
\n
"
);
fprintf
(
fout
,
"
\\
df list functions
\n
"
);
fprintf
(
fout
,
"
\\
df list functions
\n
"
);
...
@@ -222,14 +225,15 @@ slashUsage(void)
...
@@ -222,14 +225,15 @@ slashUsage(void)
" large object operations
\n
"
);
" large object operations
\n
"
);
fprintf
(
fout
,
"
\\
o [file] send all query results to [file], or |pipe
\n
"
);
fprintf
(
fout
,
"
\\
o [file] send all query results to [file], or |pipe
\n
"
);
fprintf
(
fout
,
"
\\
p show the content of the current query buffer
\n
"
);
fprintf
(
fout
,
"
\\
p show the content of the current query buffer
\n
"
);
fprintf
(
fout
,
"
\\
pset
{format|border|expanded|fieldsep|recordsep|tuples_only|title|tableattr
\n
"
fprintf
(
fout
,
"
\\
pset
<opt> set table output <opt> = {format|border|expanded|fieldsep|
\n
"
"
|pager} set table output options
\n
"
);
"
null|recordsep|tuples_only|title|tableattr|pager}
\n
"
);
fprintf
(
fout
,
"
\\
q quit psql
\n
"
);
fprintf
(
fout
,
"
\\
q quit psql
\n
"
);
fprintf
(
fout
,
"
\\
qecho <text> write text to query output stream (see
\\
o)
\n
"
);
fprintf
(
fout
,
"
\\
qecho <text> write text to query output stream (see
\\
o)
\n
"
);
fprintf
(
fout
,
"
\\
r reset (clear) the query buffer
\n
"
);
fprintf
(
fout
,
"
\\
r reset (clear) the query buffer
\n
"
);
fprintf
(
fout
,
"
\\
s [file] print history or save it in [file]
\n
"
);
fprintf
(
fout
,
"
\\
s [file] print history or save it in [file]
\n
"
);
fprintf
(
fout
,
"
\\
set <var> <value> set internal variable
\n
"
);
fprintf
(
fout
,
"
\\
set <var> <value> set internal variable
\n
"
);
fprintf
(
fout
,
"
\\
t don't show table headers or footers (currently %s)
\n
"
,
ON
(
pset
.
popt
.
topt
.
tuples_only
));
fprintf
(
fout
,
"
\\
t don't show table headers or footers (currently %s)
\n
"
,
ON
(
pset
.
popt
.
topt
.
tuples_only
));
fprintf
(
fout
,
"
\\
T <tags> HTML table tags
\n
"
);
fprintf
(
fout
,
"
\\
unset <var> unset (delete) internal variable
\n
"
);
fprintf
(
fout
,
"
\\
unset <var> unset (delete) internal variable
\n
"
);
fprintf
(
fout
,
"
\\
w <file> write current query buffer to a <file>
\n
"
);
fprintf
(
fout
,
"
\\
w <file> write current query buffer to a <file>
\n
"
);
fprintf
(
fout
,
"
\\
x toggle expanded output (currently %s)
\n
"
,
ON
(
pset
.
popt
.
topt
.
expanded
));
fprintf
(
fout
,
"
\\
x toggle expanded output (currently %s)
\n
"
,
ON
(
pset
.
popt
.
topt
.
expanded
));
...
...
src/bin/psql/startup.c
View file @
0fbde5d9
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
*
*
* Copyright 2000 by PostgreSQL Global Development Group
* Copyright 2000 by PostgreSQL Global Development Group
*
*
* $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.
29 2000/04/12 17:16:23
momjian Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.
30 2000/05/11 01:37:54
momjian Exp $
*/
*/
#include "postgres.h"
#include "postgres.h"
...
@@ -314,6 +314,7 @@ parse_psql_options(int argc, char *argv[], struct adhoc_opts * options)
...
@@ -314,6 +314,7 @@ parse_psql_options(int argc, char *argv[], struct adhoc_opts * options)
{
"host"
,
required_argument
,
NULL
,
'h'
},
{
"host"
,
required_argument
,
NULL
,
'h'
},
{
"html"
,
no_argument
,
NULL
,
'H'
},
{
"html"
,
no_argument
,
NULL
,
'H'
},
{
"list"
,
no_argument
,
NULL
,
'l'
},
{
"list"
,
no_argument
,
NULL
,
'l'
},
{
"noreadline"
,
no_argument
,
NULL
,
'n'
},
{
"output"
,
required_argument
,
NULL
,
'o'
},
{
"output"
,
required_argument
,
NULL
,
'o'
},
{
"port"
,
required_argument
,
NULL
,
'p'
},
{
"port"
,
required_argument
,
NULL
,
'p'
},
{
"pset"
,
required_argument
,
NULL
,
'P'
},
{
"pset"
,
required_argument
,
NULL
,
'P'
},
...
...
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