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
f5ed2ee5
Commit
f5ed2ee5
authored
Jan 06, 2009
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add documentation for new \d*S* patch, and clean up some of the docs.
Fix \do and trigger display for the patch too.
parent
9491c82f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
76 additions
and
69 deletions
+76
-69
doc/src/sgml/ref/psql-ref.sgml
doc/src/sgml/ref/psql-ref.sgml
+41
-34
src/bin/psql/describe.c
src/bin/psql/describe.c
+3
-3
src/bin/psql/help.c
src/bin/psql/help.c
+32
-32
No files found.
doc/src/sgml/ref/psql-ref.sgml
View file @
f5ed2ee5
<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.21
4 2008/12/19 16:25:16 petere
Exp $
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.21
5 2009/01/06 23:01:57 momjian
Exp $
PostgreSQL documentation
-->
...
...
@@ -815,8 +815,7 @@ testdb=>
</varlistentry>
<varlistentry>
<term><literal>\d [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<term><literal>\d+ [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<term><literal>\d[S+] [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<listitem>
<para>
...
...
@@ -834,6 +833,8 @@ testdb=>
more information is displayed: any comments associated with the
columns of the table are shown, as is the presence of OIDs in the
table.
The letter <literal>S</literal> restricts the listing to system objects; without
<literal>S</literal>, only non-system objects are shown.
</para>
<note>
...
...
@@ -849,7 +850,7 @@ testdb=>
</varlistentry>
<varlistentry>
<term><literal>\da [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<term><literal>\da
[S]
[ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<listitem>
<para>
...
...
@@ -857,14 +858,16 @@ testdb=>
return type and the data types they operate on. If <replaceable
class="parameter">pattern</replaceable>
is specified, only aggregates whose names match the pattern are shown.
The letter <literal>S</literal> restricts the listing
to system objects; without <literal>S</literal>, only
non-system objects are shown.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>\db [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<term><literal>\db+ [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<term><literal>\db[+] [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<listitem>
<para>
...
...
@@ -879,13 +882,15 @@ testdb=>
<varlistentry>
<term><literal>\dc [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<term><literal>\dc
[S]
[ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<listitem>
<para>
Lists all available conversions between character-set encodings.
If <replaceable class="parameter">pattern</replaceable>
is specified, only conversions whose names match the pattern are
listed.
The letter <literal>S</literal> restricts the listing to system objects; without
<literal>S</literal>, only non-system objects are shown.
</para>
</listitem>
</varlistentry>
...
...
@@ -905,13 +910,15 @@ testdb=>
<varlistentry>
<term><literal>\dd [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<term><literal>\dd
[S]
[ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<listitem>
<para>
Shows the descriptions of objects matching the <replaceable
class="parameter">pattern</replaceable>, or of all visible objects if
no argument is given. But in either case, only objects that have
a description are listed.
The letter <literal>S</literal> restricts the listing to system objects; without
<literal>S</literal>, only non-system objects are shown.
(<quote>Object</quote> covers aggregates, functions, operators,
types, relations (tables, views, indexes, sequences, large
objects), rules, and triggers.) For example:
...
...
@@ -935,20 +942,21 @@ testdb=>
<varlistentry>
<term><literal>\dD [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<term><literal>\dD
[S]
[ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<listitem>
<para>
Lists all available domains. If <replaceable
class="parameter">pattern</replaceable>
is specified, only matching domains are shown.
The letter <literal>S</literal> restricts the listing to system objects; without
<literal>S</literal>, only non-system objects are shown.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>\des [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<term><literal>\des+ [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<term><literal>\des[+] [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<listitem>
<para>
Lists all foreign servers (mnemonic: <quote>external
...
...
@@ -964,8 +972,7 @@ testdb=>
<varlistentry>
<term><literal>\deu [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<term><literal>\deu+ [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<term><literal>\deu[+] [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<listitem>
<para>
Lists all user mappings (mnemonic: <quote>external
...
...
@@ -988,8 +995,7 @@ testdb=>
<varlistentry>
<term><literal>\dew [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<term><literal>\dew+ [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<term><literal>\dew[+] [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<listitem>
<para>
Lists all foreign-data wrappers (mnemonic: <quote>external
...
...
@@ -1005,8 +1011,7 @@ testdb=>
<varlistentry>
<term><literal>\df [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<term><literal>\df+ [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<term><literal>\df[S+] [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<listitem>
<para>
...
...
@@ -1016,6 +1021,8 @@ testdb=>
is specified, only functions whose names match the pattern are shown.
If the form <literal>\df+</literal> is used, additional information about
each function, including volatility, language, source code and description, is shown.
The letter <literal>S</literal> restricts the listing to system objects; without
<literal>S</literal>, only non-system objects are shown.
</para>
<note>
...
...
@@ -1037,8 +1044,7 @@ testdb=>
<varlistentry>
<term><literal>\dF [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<term><literal>\dF+ [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<term><literal>\dF[+] [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<listitem>
<para>
Lists available text search configurations.
...
...
@@ -1052,8 +1058,7 @@ testdb=>
</varlistentry>
<varlistentry>
<term><literal>\dFd [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<term><literal>\dFd+ [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<term><literal>\dFd[+] [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<listitem>
<para>
Lists available text search dictionaries.
...
...
@@ -1067,8 +1072,7 @@ testdb=>
</varlistentry>
<varlistentry>
<term><literal>\dFp [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<term><literal>\dFp+ [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<term><literal>\dFp[+] [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<listitem>
<para>
Lists available text search parsers.
...
...
@@ -1082,8 +1086,7 @@ testdb=>
</varlistentry>
<varlistentry>
<term><literal>\dFt [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<term><literal>\dFt+ [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<term><literal>\dFt[+] [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<listitem>
<para>
Lists available text search templates.
...
...
@@ -1110,7 +1113,7 @@ testdb=>
<varlistentry>
<term><literal>\distv
S
[ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<term><literal>\distv
[S+]
[ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<listitem>
<para>
...
...
@@ -1120,11 +1123,12 @@ testdb=>
<literal>S</literal> stand for index, sequence, table, view,
and system table, respectively. You can specify any or all of
these letters, in any order, to obtain a listing of all the
matching objects. The letter <literal>S</literal> restricts
the listing to system objects; without <literal>S</literal>,
only non-system objects are shown. If <literal>+</literal> is
matching objects. If <literal>+</literal> is
appended to the command name, each object is listed with its
physical size on disk and its associated description, if any.
The letter <literal>S</literal> restricts the listing
to system objects; without <literal>S</literal>, only
non-system objects are shown.
</para>
<para>
...
...
@@ -1147,8 +1151,7 @@ testdb=>
<varlistentry>
<term><literal>\dn [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<term><literal>\dn+ [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<term><literal>\dn[+] [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<listitem>
<para>
...
...
@@ -1164,12 +1167,15 @@ testdb=>
<varlistentry>
<term><literal>\do [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<term><literal>\do
[S]
[ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<listitem>
<para>
Lists available operators with their operand and return types.
If <replaceable class="parameter">pattern</replaceable> is
specified, only operators whose names match the pattern are listed.
The letter <literal>S</literal> restricts the listing
to system objects; without <literal>S</literal>, only
non-system objects are shown.
</para>
</listitem>
</varlistentry>
...
...
@@ -1195,14 +1201,15 @@ testdb=>
<varlistentry>
<term><literal>\dT [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<term><literal>\dT+ [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<term><literal>\dT[S+] [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
<listitem>
<para>
Lists all data types or only those that match <replaceable
class="parameter">pattern</replaceable>. The command form
<literal>\dT+</literal> shows extra information, namely the type's internal name, size, and
allowed values for <type>enum</> types.
The letter <literal>S</literal> restricts the listing to system objects; without
<literal>S</literal>, only non-system objects are shown.
</para>
</listitem>
</varlistentry>
...
...
src/bin/psql/describe.c
View file @
f5ed2ee5
...
...
@@ -8,7 +8,7 @@
*
* Copyright (c) 2000-2009, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.19
4 2009/01/06 21:10:30
momjian Exp $
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.19
5 2009/01/06 23:01:57
momjian Exp $
*/
#include "postgres_fe.h"
...
...
@@ -428,7 +428,7 @@ describeOperators(const char *pattern, bool showSystem)
gettext_noop
(
"Description"
));
if
(
!
showSystem
)
appendPQExpBuffer
(
&
buf
,
"
AND
n.nspname <> 'pg_catalog'
\n
"
);
appendPQExpBuffer
(
&
buf
,
"
WHERE
n.nspname <> 'pg_catalog'
\n
"
);
processSQLNamePattern
(
pset
.
db
,
&
buf
,
pattern
,
!
showSystem
,
true
,
"n.nspname"
,
"o.oprname"
,
NULL
,
...
...
@@ -743,7 +743,7 @@ objectDescription(const char *pattern, bool showSystem)
" LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
\n
"
,
gettext_noop
(
"trigger"
));
if
(
!
showSystem
)
appendPQExpBuffer
(
&
buf
,
"
AND
n.nspname <> 'pg_catalog'
\n
"
);
appendPQExpBuffer
(
&
buf
,
"
WHERE
n.nspname <> 'pg_catalog'
\n
"
);
/* XXX not sure what to do about visibility rule here? */
processSQLNamePattern
(
pset
.
db
,
&
buf
,
pattern
,
!
showSystem
,
false
,
...
...
src/bin/psql/help.c
View file @
f5ed2ee5
...
...
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2009, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/help.c,v 1.13
4 2009/01/06 21:10:30
momjian Exp $
* $PostgreSQL: pgsql/src/bin/psql/help.c,v 1.13
5 2009/01/06 23:01:57
momjian Exp $
*/
#include "postgres_fe.h"
...
...
@@ -194,37 +194,37 @@ slashUsage(unsigned short int pager)
fprintf
(
output
,
"
\n
"
);
fprintf
(
output
,
_
(
"Informational
\n
"
));
fprintf
(
output
,
_
(
" Modifiers: S = show system objects + = Additional detail
\n
"
));
fprintf
(
output
,
_
(
"
\\
l[+]
list all databases
\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
,
_
(
"
\\
dt[S+] [PATTERN] list table
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
dv[S+] [PATTERN] list view
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
ds[S+] [PATTERN] list sequence
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
di[S+] [PATTERN] list indexe
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
df[S+] [PATTERN] list functions
\n
"
));
fprintf
(
output
,
_
(
"
\\
dT[S+] [PATTERN] list data type
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
dd[S] [PATTERN] list comments on object
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
dD[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
,
_
(
"
\\
do[S] [PATTERN] list operator
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
da[S] [PATTERN] list aggregate function
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
dc[S] [PATTERN] list conversion
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
db[+] [PATTERN] list tablespac
es
\n
"
));
fprintf
(
output
,
_
(
"
\\
dn[+] [PATTERN] list schemas
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
C list cast
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
d [PATTERN] show comment for objec
t
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
F[+] [PATTERN] list text search configuration
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
Fd[+] [PATTERN] list text search dictionarie
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
Ft [PATTERN] list text search templat
es
\n
"
));
fprintf
(
output
,
_
(
"
\\
dFp[+] [PATTERN] list text search parsers
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
g [PATTERN] list roles (groups)
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
l list large objects, same as
\\
lo_list
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
u [PATTERN] list roles (users)
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
p [PATTERN] list table, view, and sequence access privileges
\n
"
));
fprintf
(
output
,
_
(
"
\\
z [PATTERN] same as
\\
dp
\n
"
));
fprintf
(
output
,
_
(
" Modifiers: S = show system objects + = Additional detail
\n
"
));
fprintf
(
output
,
_
(
"
\\
l[+]
list all databases
\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
,
_
(
"
\\
da[S] [PATTERN] list aggregate function
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
db[+] [PATTERN] list tablespace
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
dc[S] [PATTERN] list conversion
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
dC [PATTERN] list cast
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
dd [PATTERN] show comment for object
\n
"
));
fprintf
(
output
,
_
(
"
\\
dd[S] [PATTERN] list comments on object
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
dD[S] [PATTERN] list domain
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
des[+] [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
,
_
(
"
\\
dF[+] [PATTERN] list text search configuration
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
dFd[+] [PATTERN] list text search dictionarie
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
dFp[+] [PATTERN] list text search parser
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
dFt[+] [PATTERN] list text search templat
es
\n
"
));
fprintf
(
output
,
_
(
"
\\
dg [PATTERN] list roles (groups)
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
i[S+] [PATTERN] list indexe
s
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
l list large objects, same as
\\
lo_lis
t
\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 sequences
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
t[S+] [PATTERN] list tables
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
T[S+] [PATTERN] list data types
\n
"
));
fprintf
(
output
,
_
(
"
\\
d
u [PATTERN] list roles (users)
\n
"
));
fprintf
(
output
,
_
(
"
\\
dv[S+] [PATTERN] list views
\n
"
));
fprintf
(
output
,
"
\n
"
);
fprintf
(
output
,
_
(
"Formatting
\n
"
));
...
...
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