Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
b65a5097
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b65a5097
编写于
3月 30, 2008
作者:
T
Tom Lane
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Show database access privileges in psql's \l command. For \l+, also show
database size, when available to the current user. Andrew Gilligan
上级
2be368a5
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
18 addition
and
7 deletion
+18
-7
doc/src/sgml/ref/psql-ref.sgml
doc/src/sgml/ref/psql-ref.sgml
+7
-4
src/bin/psql/describe.c
src/bin/psql/describe.c
+11
-3
未找到文件。
doc/src/sgml/ref/psql-ref.sgml
浏览文件 @
b65a5097
<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.19
8 2007/12/11 19:57:32
tgl Exp $
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.19
9 2008/03/30 18:10:20
tgl Exp $
PostgreSQL documentation
-->
...
...
@@ -1328,9 +1328,12 @@ Tue Oct 26 21:40:57 CEST 1999
<term><literal>\l+</literal> (or <literal>\list+</literal>)</term>
<listitem>
<para>
List the names, owners, and character set encodings of all the databases in
the server. If <literal>+</literal> is appended to the command
name, database descriptions are also displayed.
List the names, owners, character set encodings, and access privileges
of all the databases in the server.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
(Size information is only available for databases that the current
user can connect to.)
</para>
</listitem>
</varlistentry>
...
...
src/bin/psql/describe.c
浏览文件 @
b65a5097
...
...
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2008, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.16
5 2008/03/30 17:50:11
tgl Exp $
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.16
6 2008/03/30 18:10:20
tgl Exp $
*/
#include "postgres_fe.h"
#include "describe.h"
...
...
@@ -417,12 +417,20 @@ listAllDbs(bool verbose)
printfPQExpBuffer
(
&
buf
,
"SELECT d.datname as
\"
%s
\"
,
\n
"
" r.rolname as
\"
%s
\"
,
\n
"
" pg_catalog.pg_encoding_to_char(d.encoding) as
\"
%s
\"
"
,
" pg_catalog.pg_encoding_to_char(d.encoding) as
\"
%s
\"
,
\n
"
" d.datacl as
\"
%s
\"
"
,
gettext_noop
(
"Name"
),
gettext_noop
(
"Owner"
),
gettext_noop
(
"Encoding"
));
gettext_noop
(
"Encoding"
),
gettext_noop
(
"Access Privileges"
));
if
(
verbose
)
{
appendPQExpBuffer
(
&
buf
,
",
\n
CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')
\n
"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))
\n
"
" ELSE 'No Access'
\n
"
" END as
\"
%s
\"
"
,
gettext_noop
(
"Size"
));
appendPQExpBuffer
(
&
buf
,
",
\n
t.spcname as
\"
%s
\"
"
,
gettext_noop
(
"Tablespace"
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录