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
33e7eac3
Commit
33e7eac3
authored
16 years ago
by
Bruce Momjian
Browse files
Options
Downloads
Patches
Plain Diff
Change psql \d* display so 'S' _or_ a pattern include system objects.
parent
248891f0
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/src/sgml/ref/psql-ref.sgml
+28
-28
28 additions, 28 deletions
doc/src/sgml/ref/psql-ref.sgml
src/bin/psql/describe.c
+22
-22
22 additions, 22 deletions
src/bin/psql/describe.c
with
50 additions
and
50 deletions
doc/src/sgml/ref/psql-ref.sgml
+
28
−
28
View file @
33e7eac3
<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.22
0
2009/0
2/26 16:02:37 petere
Exp $
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.22
1
2009/0
4/02 15:15:31 momjian
Exp $
PostgreSQL documentation
-->
...
...
@@ -853,9 +853,9 @@ 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> adds the listing of system
objects; without
<literal>S</literal>
, only non-
system
objects
are shown
.
By default, only user-created objects are shown; supply a
pattern or the
<literal>S</literal>
modifier to include
system
objects.
</para>
<note>
...
...
@@ -879,9 +879,9 @@ 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> adds the listing of system
objects; without
<literal>S</literal>
, only non-
system
objects
are shown
.
By default, only user-created objects are shown; supply a
pattern or the
<literal>S</literal>
modifier to include
system
objects.
</para>
</listitem>
</varlistentry>
...
...
@@ -910,9 +910,9 @@ testdb=>
If <replaceable class="parameter">pattern</replaceable>
is specified, only conversions whose names match the pattern are
listed.
The letter <literal>S</literal> adds the listing of system
objects; without
<literal>S</literal>
, only non-
system
objects
are shown
.
By default, only user-created objects are shown; supply a
pattern or the
<literal>S</literal>
modifier to include
system
objects.
</para>
</listitem>
</varlistentry>
...
...
@@ -939,9 +939,9 @@ testdb=>
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> adds the listing of system
objects; without
<literal>S</literal>
, only non-
system
objects
are shown
.
By default, only user-created objects are shown; supply a
pattern or the
<literal>S</literal>
modifier to include
system
objects.
(<quote>Object</quote> covers aggregates, functions, operators,
types, relations (tables, views, indexes, sequences, large
objects), rules, and triggers.) For example:
...
...
@@ -971,9 +971,9 @@ testdb=>
Lists all available domains. If <replaceable
class="parameter">pattern</replaceable>
is specified, only matching domains are shown.
The letter <literal>S</literal> adds the listing of system
objects; without
<literal>S</literal>
, only non-
system
objects
are shown
.
By default, only user-created objects are shown; supply a
pattern or the
<literal>S</literal>
modifier to include
system
objects.
</para>
</listitem>
</varlistentry>
...
...
@@ -1045,9 +1045,9 @@ 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> adds the listing of system
objects; without
<literal>S</literal>
, only non-
system
objects
are shown
.
By default, only user-created objects are shown; supply a
pattern or the
<literal>S</literal>
modifier to include
system
objects.
</para>
<note>
...
...
@@ -1155,9 +1155,9 @@ testdb=>
and tables. 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> adds the listing of system
objects; without
<literal>S</literal>
, only non-
system
objects
are shown
.
By default, only user-created objects are shown; supply a
pattern or the
<literal>S</literal>
modifier to include
system
objects.
</para>
<para>
...
...
@@ -1202,9 +1202,9 @@ testdb=>
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> adds the listing of system
objects; without
<literal>S</literal>
, only non-
system
objects
are shown
.
By default, only user-created objects are shown; supply a
pattern or the
<literal>S</literal>
modifier to include
system
objects.
</para>
</listitem>
</varlistentry>
...
...
@@ -1237,9 +1237,9 @@ testdb=>
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> adds the listing of system
objects; without
<literal>S</literal>
, only non-
system
objects
are shown
.
By default, only user-created objects are shown; supply a
pattern or the
<literal>S</literal>
modifier to include
system
objects.
</para>
</listitem>
</varlistentry>
...
...
This diff is collapsed.
Click to expand it.
src/bin/psql/describe.c
+
22
−
22
View file @
33e7eac3
...
...
@@ -8,7 +8,7 @@
*
* Copyright (c) 2000-2009, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.20
3
2009/0
3/26 22:26:07 petere
Exp $
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.20
4
2009/0
4/02 15:15:32 momjian
Exp $
*/
#include
"postgres_fe.h"
...
...
@@ -94,7 +94,7 @@ describeAggregates(const char *pattern, bool verbose, bool showSystem)
"WHERE p.proisagg
\n
"
,
gettext_noop
(
"Description"
));
if
(
!
showSystem
)
if
(
!
showSystem
&&
!
pattern
)
appendPQExpBuffer
(
&
buf
,
" AND n.nspname <> 'pg_catalog'
\n
"
);
processSQLNamePattern
(
pset
.
db
,
&
buf
,
pattern
,
true
,
false
,
...
...
@@ -281,7 +281,7 @@ describeFunctions(const char *pattern, bool verbose, bool showSystem)
" AND p.proargtypes[0] IS DISTINCT FROM 'pg_catalog.cstring'::pg_catalog.regtype
\n
"
" AND NOT p.proisagg
\n
"
);
if
(
!
showSystem
)
if
(
!
showSystem
&&
!
pattern
)
appendPQExpBuffer
(
&
buf
,
" AND n.nspname <> 'pg_catalog'
\n
"
);
processSQLNamePattern
(
pset
.
db
,
&
buf
,
pattern
,
true
,
false
,
...
...
@@ -372,7 +372,7 @@ describeTypes(const char *pattern, bool verbose, bool showSystem)
else
appendPQExpBuffer
(
&
buf
,
" AND t.typname !~ '^_'
\n
"
);
if
(
!
showSystem
)
if
(
!
showSystem
&&
!
pattern
)
appendPQExpBuffer
(
&
buf
,
" AND n.nspname <> 'pg_catalog'
\n
"
);
/* Match name pattern against either internal or external name */
...
...
@@ -427,10 +427,10 @@ describeOperators(const char *pattern, bool showSystem)
gettext_noop
(
"Result type"
),
gettext_noop
(
"Description"
));
if
(
!
showSystem
)
if
(
!
showSystem
&&
!
pattern
)
appendPQExpBuffer
(
&
buf
,
" WHERE n.nspname <> 'pg_catalog'
\n
"
);
processSQLNamePattern
(
pset
.
db
,
&
buf
,
pattern
,
!
showSystem
,
true
,
processSQLNamePattern
(
pset
.
db
,
&
buf
,
pattern
,
!
showSystem
&&
!
pattern
,
true
,
"n.nspname"
,
"o.oprname"
,
NULL
,
"pg_catalog.pg_operator_is_visible(o.oid)"
);
...
...
@@ -631,7 +631,7 @@ objectDescription(const char *pattern, bool showSystem)
" WHERE p.proisagg
\n
"
,
gettext_noop
(
"aggregate"
));
if
(
!
showSystem
)
if
(
!
showSystem
&&
!
pattern
)
appendPQExpBuffer
(
&
buf
,
" AND n.nspname <> 'pg_catalog'
\n
"
);
processSQLNamePattern
(
pset
.
db
,
&
buf
,
pattern
,
true
,
false
,
...
...
@@ -654,7 +654,7 @@ objectDescription(const char *pattern, bool showSystem)
" AND NOT p.proisagg
\n
"
,
gettext_noop
(
"function"
));
if
(
!
showSystem
)
if
(
!
showSystem
&&
!
pattern
)
appendPQExpBuffer
(
&
buf
,
" AND n.nspname <> 'pg_catalog'
\n
"
);
processSQLNamePattern
(
pset
.
db
,
&
buf
,
pattern
,
true
,
false
,
...
...
@@ -672,10 +672,10 @@ objectDescription(const char *pattern, bool showSystem)
" LEFT JOIN pg_catalog.pg_namespace n ON n.oid = o.oprnamespace
\n
"
,
gettext_noop
(
"operator"
));
if
(
!
showSystem
)
if
(
!
showSystem
&&
!
pattern
)
appendPQExpBuffer
(
&
buf
,
" WHERE n.nspname <> 'pg_catalog'
\n
"
);
processSQLNamePattern
(
pset
.
db
,
&
buf
,
pattern
,
!
showSystem
,
false
,
processSQLNamePattern
(
pset
.
db
,
&
buf
,
pattern
,
!
showSystem
&&
!
pattern
,
false
,
"n.nspname"
,
"o.oprname"
,
NULL
,
"pg_catalog.pg_operator_is_visible(o.oid)"
);
...
...
@@ -690,10 +690,10 @@ objectDescription(const char *pattern, bool showSystem)
" LEFT JOIN pg_catalog.pg_namespace n ON n.oid = t.typnamespace
\n
"
,
gettext_noop
(
"data type"
));
if
(
!
showSystem
)
if
(
!
showSystem
&&
!
pattern
)
appendPQExpBuffer
(
&
buf
,
" WHERE n.nspname <> 'pg_catalog'
\n
"
);
processSQLNamePattern
(
pset
.
db
,
&
buf
,
pattern
,
!
showSystem
,
false
,
processSQLNamePattern
(
pset
.
db
,
&
buf
,
pattern
,
!
showSystem
&&
!
pattern
,
false
,
"n.nspname"
,
"pg_catalog.format_type(t.oid, NULL)"
,
NULL
,
"pg_catalog.pg_type_is_visible(t.oid)"
);
...
...
@@ -714,7 +714,7 @@ objectDescription(const char *pattern, bool showSystem)
gettext_noop
(
"view"
),
gettext_noop
(
"index"
),
gettext_noop
(
"sequence"
));
if
(
!
showSystem
)
if
(
!
showSystem
&&
!
pattern
)
appendPQExpBuffer
(
&
buf
,
" AND n.nspname <> 'pg_catalog'
\n
"
);
processSQLNamePattern
(
pset
.
db
,
&
buf
,
pattern
,
true
,
false
,
...
...
@@ -734,7 +734,7 @@ objectDescription(const char *pattern, bool showSystem)
" WHERE r.rulename != '_RETURN'
\n
"
,
gettext_noop
(
"rule"
));
if
(
!
showSystem
)
if
(
!
showSystem
&&
!
pattern
)
appendPQExpBuffer
(
&
buf
,
" AND n.nspname <> 'pg_catalog'
\n
"
);
/* XXX not sure what to do about visibility rule here? */
...
...
@@ -753,11 +753,11 @@ objectDescription(const char *pattern, bool showSystem)
" JOIN pg_catalog.pg_class c ON c.oid = t.tgrelid
\n
"
" LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
\n
"
,
gettext_noop
(
"trigger"
));
if
(
!
showSystem
)
if
(
!
showSystem
&&
!
pattern
)
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
,
processSQLNamePattern
(
pset
.
db
,
&
buf
,
pattern
,
!
showSystem
&&
!
pattern
,
false
,
"n.nspname"
,
"t.tgname"
,
NULL
,
"pg_catalog.pg_table_is_visible(c.oid)"
);
...
...
@@ -808,10 +808,10 @@ describeTableDetails(const char *pattern, bool verbose, bool showSystem)
"FROM pg_catalog.pg_class c
\n
"
" LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
\n
"
);
if
(
!
showSystem
)
if
(
!
showSystem
&&
!
pattern
)
appendPQExpBuffer
(
&
buf
,
" WHERE n.nspname <> 'pg_catalog'
\n
"
);
processSQLNamePattern
(
pset
.
db
,
&
buf
,
pattern
,
!
showSystem
,
false
,
processSQLNamePattern
(
pset
.
db
,
&
buf
,
pattern
,
!
showSystem
&&
!
pattern
,
false
,
"n.nspname"
,
"c.relname"
,
NULL
,
"pg_catalog.pg_table_is_visible(c.oid)"
);
...
...
@@ -2008,12 +2008,12 @@ listTables(const char *tabtypes, const char *pattern, bool verbose, bool showSys
appendPQExpBuffer
(
&
buf
,
"'i',"
);
if
(
showSeq
)
appendPQExpBuffer
(
&
buf
,
"'S',"
);
if
(
showSystem
)
if
(
showSystem
||
pattern
)
appendPQExpBuffer
(
&
buf
,
"'s',"
);
/* was RELKIND_SPECIAL in <= 8.1 */
appendPQExpBuffer
(
&
buf
,
"''"
);
/* dummy */
appendPQExpBuffer
(
&
buf
,
")
\n
"
);
if
(
!
showSystem
)
if
(
!
showSystem
&&
!
pattern
)
/* Exclude system and pg_toast objects, but show temp tables */
appendPQExpBuffer
(
&
buf
,
" AND n.nspname <> 'pg_catalog'
\n
"
...
...
@@ -2087,7 +2087,7 @@ listDomains(const char *pattern, bool showSystem)
gettext_noop
(
"Modifier"
),
gettext_noop
(
"Check"
));
if
(
!
showSystem
)
if
(
!
showSystem
&&
!
pattern
)
appendPQExpBuffer
(
&
buf
,
" AND n.nspname <> 'pg_catalog'
\n
"
);
processSQLNamePattern
(
pset
.
db
,
&
buf
,
pattern
,
true
,
false
,
...
...
@@ -2142,7 +2142,7 @@ listConversions(const char *pattern, bool showSystem)
gettext_noop
(
"yes"
),
gettext_noop
(
"no"
),
gettext_noop
(
"Default?"
));
if
(
!
showSystem
)
if
(
!
showSystem
&&
!
pattern
)
appendPQExpBuffer
(
&
buf
,
" AND n.nspname <> 'pg_catalog'
\n
"
);
processSQLNamePattern
(
pset
.
db
,
&
buf
,
pattern
,
true
,
false
,
...
...
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