Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
847f8b39
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,发现更多精彩内容 >>
提交
847f8b39
编写于
9月 06, 2002
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix printf() quote handling and improper exit(), per Tom.
上级
9a9825f9
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
16 addition
and
17 deletion
+16
-17
src/bin/psql/input.c
src/bin/psql/input.c
+6
-6
src/bin/psql/startup.c
src/bin/psql/startup.c
+5
-5
src/interfaces/libpq/fe-connect.c
src/interfaces/libpq/fe-connect.c
+5
-6
未找到文件。
src/bin/psql/input.c
浏览文件 @
847f8b39
...
...
@@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
* $Header: /cvsroot/pgsql/src/bin/psql/input.c,v 1.2
0 2002/09/05 22:05:50
momjian Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/input.c,v 1.2
1 2002/09/06 02:33:46
momjian Exp $
*/
#include "postgres_fe.h"
#include "input.h"
...
...
@@ -30,7 +30,7 @@ static void finishInput(void);
static
void
finishInput
(
int
,
void
*
);
#endif
#define PSQLHISTORY "
/
.psql_history"
#define PSQLHISTORY ".psql_history"
/*
...
...
@@ -144,12 +144,12 @@ initializeInput(int flags)
home
=
getenv
(
"HOME"
);
if
(
home
)
{
char
*
psql_history
=
(
char
*
)
malloc
(
strlen
(
home
)
+
char
*
psql_history
=
(
char
*
)
malloc
(
strlen
(
home
)
+
1
+
strlen
(
PSQLHISTORY
)
+
1
);
if
(
psql_history
)
{
sprintf
(
psql_history
,
"%s
"
PSQLHISTORY
,
home
);
sprintf
(
psql_history
,
"%s
/%s"
,
home
,
PSQLHISTORY
);
read_history
(
psql_history
);
free
(
psql_history
);
}
...
...
@@ -204,7 +204,7 @@ finishInput(int exitstatus, void *arg)
home
=
getenv
(
"HOME"
);
if
(
home
)
{
psql_history
=
(
char
*
)
malloc
(
strlen
(
home
)
+
psql_history
=
(
char
*
)
malloc
(
strlen
(
home
)
+
1
+
strlen
(
PSQLHISTORY
)
+
1
);
if
(
psql_history
)
{
...
...
@@ -212,7 +212,7 @@ finishInput(int exitstatus, void *arg)
if
(
var
)
stifle_history
(
atoi
(
var
));
sprintf
(
psql_history
,
"%s
"
PSQLHISTORY
,
home
);
sprintf
(
psql_history
,
"%s
/%s"
,
home
,
PSQLHISTORY
);
write_history
(
psql_history
);
free
(
psql_history
);
}
...
...
src/bin/psql/startup.c
浏览文件 @
847f8b39
...
...
@@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
* $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.6
5 2002/09/05 22:05:50
momjian Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.6
6 2002/09/06 02:33:47
momjian Exp $
*/
#include "postgres_fe.h"
...
...
@@ -42,7 +42,7 @@
*/
PsqlSettings
pset
;
#define PSQLRC "
/
.psqlrc"
#define PSQLRC ".psqlrc"
/*
* Structures to pass information between the option parsing routine
...
...
@@ -605,7 +605,7 @@ process_psqlrc(void)
if
(
home
)
{
psqlrc
=
malloc
(
strlen
(
home
)
+
strlen
(
PSQLRC
)
+
1
+
psqlrc
=
malloc
(
strlen
(
home
)
+
1
+
strlen
(
PSQLRC
)
+
1
+
strlen
(
PG_VERSION
)
+
1
);
if
(
!
psqlrc
)
{
...
...
@@ -613,12 +613,12 @@ process_psqlrc(void)
exit
(
EXIT_FAILURE
);
}
sprintf
(
psqlrc
,
"%s
"
PSQLRC
"-"
PG_VERSION
,
home
);
sprintf
(
psqlrc
,
"%s
/%s-%s"
,
home
,
PSQLRC
,
PG_VERSION
);
if
(
access
(
psqlrc
,
R_OK
)
==
0
)
process_file
(
psqlrc
);
else
{
sprintf
(
psqlrc
,
"%s
"
PSQLRC
,
home
);
sprintf
(
psqlrc
,
"%s
/%s"
,
home
,
PSQLRC
);
if
(
access
(
psqlrc
,
R_OK
)
==
0
)
process_file
(
psqlrc
);
}
...
...
src/interfaces/libpq/fe-connect.c
浏览文件 @
847f8b39
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.20
3 2002/09/05 22:24:23
momjian Exp $
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.20
4 2002/09/06 02:33:47
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -66,7 +66,7 @@ inet_aton(const char *cp, struct in_addr * inp)
#define NOTIFYLIST_INITIAL_SIZE 10
#define NOTIFYLIST_GROWBY 10
#define PGPASSFILE "
/
.pgpass"
#define PGPASSFILE ".pgpass"
/* ----------
* Definition of the conninfo parameters and their fallback resources.
...
...
@@ -2927,18 +2927,17 @@ PasswordFromFile(char *hostname, char *port, char *dbname, char *username)
home
=
getenv
(
"HOME"
);
if
(
home
)
{
pgpassfile
=
malloc
(
strlen
(
home
)
+
strlen
(
PGPASSFILE
)
+
1
);
pgpassfile
=
malloc
(
strlen
(
home
)
+
1
+
strlen
(
PGPASSFILE
)
+
1
);
if
(
!
pgpassfile
)
{
fprintf
(
stderr
,
libpq_gettext
(
"out of memory
\n
"
));
exit
(
EXIT_FAILURE
)
;
return
NULL
;
}
}
else
return
NULL
;
sprintf
(
pgpassfile
,
"%s
"
PGPASSFILE
,
home
);
sprintf
(
pgpassfile
,
"%s
/%s"
,
home
,
PGPASSFILE
);
/* If password file cannot be opened, ignore it. */
if
(
stat
(
pgpassfile
,
&
stat_buf
)
==
-
1
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录