Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
55ea144a
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,发现更多精彩内容 >>
提交
55ea144a
编写于
2月 16, 2010
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Prevent psql version banner from being printed by the \c command if the
versions match, per report from Peter.
上级
aa7e7ae9
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
9 addition
and
8 deletion
+9
-8
src/bin/psql/command.c
src/bin/psql/command.c
+5
-4
src/bin/psql/command.h
src/bin/psql/command.h
+2
-2
src/bin/psql/startup.c
src/bin/psql/startup.c
+2
-2
未找到文件。
src/bin/psql/command.c
浏览文件 @
55ea144a
...
...
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2010, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.21
4 2010/02/05 03:09:05 joe
Exp $
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.21
5 2010/02/16 21:07:01 momjian
Exp $
*/
#include "postgres_fe.h"
#include "command.h"
...
...
@@ -1331,7 +1331,7 @@ do_connect(char *dbname, char *user, char *host, char *port)
PQsetNoticeProcessor
(
n_conn
,
NoticeProcessor
,
NULL
);
pset
.
db
=
n_conn
;
SyncVariables
();
connection_warnings
();
/* Must be after SyncVariables */
connection_warnings
(
false
);
/* Must be after SyncVariables */
/* Tell the user about the new connection */
if
(
!
pset
.
quiet
)
...
...
@@ -1357,7 +1357,7 @@ do_connect(char *dbname, char *user, char *host, char *port)
void
connection_warnings
(
void
)
connection_warnings
(
bool
in_startup
)
{
if
(
!
pset
.
quiet
&&
!
pset
.
notty
)
{
...
...
@@ -1383,7 +1383,8 @@ connection_warnings(void)
printf
(
_
(
"%s (%s, server %s)
\n
"
),
pset
.
progname
,
PG_VERSION
,
server_version
);
}
else
/* For version match, only print psql banner on startup. */
else
if
(
in_startup
)
printf
(
"%s (%s)
\n
"
,
pset
.
progname
,
PG_VERSION
);
if
(
pset
.
sversion
/
100
!=
client_ver
/
100
)
...
...
src/bin/psql/command.h
浏览文件 @
55ea144a
...
...
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2010, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/command.h,v 1.3
3 2010/01/02 16:57:59
momjian Exp $
* $PostgreSQL: pgsql/src/bin/psql/command.h,v 1.3
4 2010/02/16 21:07:01
momjian Exp $
*/
#ifndef COMMAND_H
#define COMMAND_H
...
...
@@ -34,7 +34,7 @@ extern bool do_pset(const char *param,
printQueryOpt
*
popt
,
bool
quiet
);
extern
void
connection_warnings
(
void
);
extern
void
connection_warnings
(
bool
in_startup
);
extern
void
SyncVariables
(
void
);
...
...
src/bin/psql/startup.c
浏览文件 @
55ea144a
...
...
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2010, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/startup.c,v 1.16
0 2010/02/05 03:09:05 joe
Exp $
* $PostgreSQL: pgsql/src/bin/psql/startup.c,v 1.16
1 2010/02/16 21:07:01 momjian
Exp $
*/
#include "postgres_fe.h"
...
...
@@ -294,7 +294,7 @@ main(int argc, char *argv[])
if
(
!
options
.
no_psqlrc
)
process_psqlrc
(
argv
[
0
]);
connection_warnings
();
connection_warnings
(
true
);
if
(
!
pset
.
quiet
&&
!
pset
.
notty
)
printf
(
_
(
"Type
\"
help
\"
for help.
\n\n
"
));
if
(
!
pset
.
notty
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录