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
286fb252
Commit
286fb252
authored
Sep 22, 2002
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make \dS work more like it used to, viz, show only system objects.
parent
fce573ae
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
12 deletions
+15
-12
doc/src/sgml/ref/psql-ref.sgml
doc/src/sgml/ref/psql-ref.sgml
+4
-2
src/bin/psql/describe.c
src/bin/psql/describe.c
+11
-10
No files found.
doc/src/sgml/ref/psql-ref.sgml
View file @
286fb252
<!--
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.7
6 2002/09/21 18:32:54 petere
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.7
7 2002/09/22 20:44:22 tgl
Exp $
PostgreSQL documentation
PostgreSQL documentation
-->
-->
...
@@ -884,7 +884,9 @@ testdb=>
...
@@ -884,7 +884,9 @@ testdb=>
This is not the actual command name: the letters i, s, t, v, S
This is not the actual command name: the letters i, s, t, v, S
stand for index, sequence, table, view, and system table,
stand for index, sequence, table, view, and system table,
respectively. You can specify any or all of these letters, in any
respectively. You can specify any or all of these letters, in any
order, to obtain a listing of all the matching objects.
order, to obtain a listing of all the matching objects. The letter
S restricts the listing to system objects; without S, only non-system
objects are shown.
If <quote>+</quote> is appended to the command name, each object is
If <quote>+</quote> is appended to the command name, each object is
listed with its associated description, if any.
listed with its associated description, if any.
</para>
</para>
...
...
src/bin/psql/describe.c
View file @
286fb252
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
*
*
* Copyright 2000-2002 by PostgreSQL Global Development Group
* Copyright 2000-2002 by PostgreSQL Global Development Group
*
*
* $Header: /cvsroot/pgsql/src/bin/psql/describe.c,v 1.6
8 2002/09/04 20:31:35 momjian
Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/describe.c,v 1.6
9 2002/09/22 20:44:22 tgl
Exp $
*/
*/
#include "postgres_fe.h"
#include "postgres_fe.h"
#include "describe.h"
#include "describe.h"
...
@@ -1231,7 +1231,7 @@ describeUsers(const char *pattern)
...
@@ -1231,7 +1231,7 @@ describeUsers(const char *pattern)
* i - indexes
* i - indexes
* v - views
* v - views
* s - sequences
* s - sequences
* S - system tables (
~ '^pg_'
)
* S - system tables (
pg_catalog
)
* (any order of the above is fine)
* (any order of the above is fine)
*/
*/
bool
bool
...
@@ -1247,7 +1247,7 @@ listTables(const char *tabtypes, const char *pattern, bool verbose)
...
@@ -1247,7 +1247,7 @@ listTables(const char *tabtypes, const char *pattern, bool verbose)
PGresult
*
res
;
PGresult
*
res
;
printQueryOpt
myopt
=
pset
.
popt
;
printQueryOpt
myopt
=
pset
.
popt
;
if
(
showSystem
&&
!
(
showSeq
||
showIndexes
||
showViews
||
showTables
))
if
(
!
(
showTables
||
showIndexes
||
showViews
||
showSeq
))
showTables
=
showViews
=
showSeq
=
true
;
showTables
=
showViews
=
showSeq
=
true
;
initPQExpBuffer
(
&
buf
);
initPQExpBuffer
(
&
buf
);
...
@@ -1296,18 +1296,19 @@ listTables(const char *tabtypes, const char *pattern, bool verbose)
...
@@ -1296,18 +1296,19 @@ listTables(const char *tabtypes, const char *pattern, bool verbose)
appendPQExpBuffer
(
&
buf
,
")
\n
"
);
appendPQExpBuffer
(
&
buf
,
")
\n
"
);
/*
/*
* Unless showSystem is specified, we suppress system tables, ie,
* If showSystem is specified, show only system objects (those in
* pg_catalog). Otherwise, suppress system objects, including
* those in pg_catalog and pg_toast. (We don't want to hide temp
* those in pg_catalog and pg_toast. (We don't want to hide temp
* tables though.)
* tables though.)
*/
*/
if
(
showSystem
)
if
(
showSystem
)
processNamePattern
(
&
buf
,
pattern
,
true
,
false
,
appendPQExpBuffer
(
&
buf
,
" AND n.nspname = 'pg_catalog'
\n
"
);
"n.nspname"
,
"c.relname"
,
NULL
,
"pg_catalog.pg_table_is_visible(c.oid)"
);
else
else
processNamePattern
(
&
buf
,
pattern
,
true
,
false
,
appendPQExpBuffer
(
&
buf
,
" AND n.nspname NOT IN ('pg_catalog', 'pg_toast')
\n
"
);
"n.nspname"
,
"c.relname"
,
NULL
,
"pg_catalog.pg_table_is_visible(c.oid) AND n.nspname <> 'pg_catalog' AND n.nspname <> 'pg_toast'"
);
processNamePattern
(
&
buf
,
pattern
,
true
,
false
,
"n.nspname"
,
"c.relname"
,
NULL
,
"pg_catalog.pg_table_is_visible(c.oid)"
);
appendPQExpBuffer
(
&
buf
,
"ORDER BY 1,2;"
);
appendPQExpBuffer
(
&
buf
,
"ORDER BY 1,2;"
);
...
...
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