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
93a1fce5
Commit
93a1fce5
authored
Jul 15, 2004
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add permission display to \db+.
parent
a837ed88
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
11 deletions
+20
-11
doc/src/sgml/ref/psql-ref.sgml
doc/src/sgml/ref/psql-ref.sgml
+3
-1
src/bin/psql/command.c
src/bin/psql/command.c
+2
-2
src/bin/psql/describe.c
src/bin/psql/describe.c
+11
-4
src/bin/psql/describe.h
src/bin/psql/describe.h
+2
-2
src/bin/psql/help.c
src/bin/psql/help.c
+2
-2
No files found.
doc/src/sgml/ref/psql-ref.sgml
View file @
93a1fce5
<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.11
8 2004/07/13 16:48:15
momjian Exp $
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.11
9 2004/07/15 03:56:04
momjian Exp $
PostgreSQL documentation
-->
...
...
@@ -832,6 +832,8 @@ testdb=>
Lists all available tablespaces. If <replaceable
class="parameter">pattern</replaceable>
is specified, only tablespaces whose names match the pattern are shown.
If <literal>+</literal> is appended to the command name, each object
is listed with its associated permissions.
</para>
</listitem>
</varlistentry>
...
...
src/bin/psql/command.c
View file @
93a1fce5
...
...
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2003, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.12
1 2004/07/13 16:48:1
6 momjian Exp $
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.12
2 2004/07/15 03:56:0
6 momjian Exp $
*/
#include "postgres_fe.h"
#include "command.h"
...
...
@@ -302,7 +302,7 @@ exec_command(const char *cmd,
success
=
describeAggregates
(
pattern
,
show_verbose
);
break
;
case
'b'
:
success
=
describeTablespaces
(
pattern
);
success
=
describeTablespaces
(
pattern
,
show_verbose
);
break
;
case
'c'
:
success
=
listConversions
(
pattern
);
...
...
src/bin/psql/describe.c
View file @
93a1fce5
...
...
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2003, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.10
2 2004/07/13 16:48:1
6 momjian Exp $
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.10
3 2004/07/15 03:56:0
6 momjian Exp $
*/
#include "postgres_fe.h"
#include "describe.h"
...
...
@@ -106,7 +106,7 @@ describeAggregates(const char *pattern, bool verbose)
* Takes an optional regexp to select particular tablespaces
*/
bool
describeTablespaces
(
const
char
*
pattern
)
describeTablespaces
(
const
char
*
pattern
,
bool
verbose
)
{
PQExpBufferData
buf
;
PGresult
*
res
;
...
...
@@ -117,10 +117,17 @@ describeTablespaces(const char *pattern)
printfPQExpBuffer
(
&
buf
,
"SELECT spcname AS
\"
%s
\"
,
\n
"
" pg_catalog.pg_get_userbyid(spcowner) AS
\"
%s
\"
,
\n
"
" spclocation AS
\"
%s
\"\n
"
"FROM pg_catalog.pg_tablespace
\n
"
,
" spclocation AS
\"
%s
\"
"
,
_
(
"Name"
),
_
(
"Owner"
),
_
(
"Location"
));
if
(
verbose
)
appendPQExpBuffer
(
&
buf
,
",
\n
spcacl as
\"
%s
\"
"
,
_
(
"Access privileges"
));
appendPQExpBuffer
(
&
buf
,
"
\n
FROM pg_catalog.pg_tablespace
\n
"
);
processNamePattern
(
&
buf
,
pattern
,
false
,
false
,
NULL
,
"spcname"
,
NULL
,
NULL
);
...
...
src/bin/psql/describe.h
View file @
93a1fce5
...
...
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2003, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/describe.h,v 1.2
5 2004/07/13 16:48:1
6 momjian Exp $
* $PostgreSQL: pgsql/src/bin/psql/describe.h,v 1.2
6 2004/07/15 03:56:0
6 momjian Exp $
*/
#ifndef DESCRIBE_H
#define DESCRIBE_H
...
...
@@ -14,7 +14,7 @@
bool
describeAggregates
(
const
char
*
pattern
,
bool
verbose
);
/* \db */
bool
describeTablespaces
(
const
char
*
pattern
);
bool
describeTablespaces
(
const
char
*
pattern
,
bool
verbose
);
/* \df */
bool
describeFunctions
(
const
char
*
pattern
,
bool
verbose
);
...
...
src/bin/psql/help.c
View file @
93a1fce5
...
...
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2003, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/help.c,v 1.
89 2004/07/13 16:48:1
6 momjian Exp $
* $PostgreSQL: pgsql/src/bin/psql/help.c,v 1.
90 2004/07/15 03:56:0
6 momjian Exp $
*/
#include "postgres_fe.h"
#include "common.h"
...
...
@@ -211,7 +211,7 @@ slashUsage(unsigned short int pager)
fprintf
(
output
,
_
(
"
\\
d{t|i|s|v|S} [PATTERN] (add
\"
+
\"
for more detail)
\n
"
" list tables/indexes/sequences/views/system tables
\n
"
));
fprintf
(
output
,
_
(
"
\\
da [PATTERN] list aggregate functions
\n
"
));
fprintf
(
output
,
_
(
"
\\
db [PATTERN] list tablespaces
\n
"
));
fprintf
(
output
,
_
(
"
\\
db [PATTERN] list tablespaces
(add
\"
+
\"
for more detail)
\n
"
));
fprintf
(
output
,
_
(
"
\\
dc [PATTERN] list conversions
\n
"
));
fprintf
(
output
,
_
(
"
\\
dC list casts
\n
"
));
fprintf
(
output
,
_
(
"
\\
dd [PATTERN] show comment for object
\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