Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
18627c55
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,发现更多精彩内容 >>
提交
18627c55
编写于
5月 17, 2006
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Allow the .pgpass hostname to match the default socket directory, as
well as a blank pghost.
上级
71233492
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
20 addition
and
5 deletion
+20
-5
doc/src/sgml/libpq.sgml
doc/src/sgml/libpq.sgml
+4
-4
src/interfaces/libpq/fe-connect.c
src/interfaces/libpq/fe-connect.c
+16
-1
未找到文件。
doc/src/sgml/libpq.sgml
浏览文件 @
18627c55
<!-- $PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.20
8 2006/05/06 16:25:11
momjian Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.20
9 2006/05/17 21:50:54
momjian Exp $ -->
<chapter id="libpq">
<title><application>libpq</application> - C Library</title>
...
...
@@ -4000,9 +4000,9 @@ current connection parameters will be used. (Therefore, put more-specific
entries first when you are using wildcards.)
If an entry needs to contain <literal>:</literal> or
<literal>\</literal>, escape this character with <literal>\</literal>.
A hostname of <literal>localhost</> matches both
<literal>host</> (TCP
)
and
<literal>local</> (Unix domain socket) connections coming from the
local machine.
A hostname of <literal>localhost</> matches both
TCP <literal>host</> (hostname <literal>localhost</>
)
and
Unix domain socket <literal>local</> (<literal>pghost</> empty or the default socket directory)
connections coming from the
local machine.
</para>
<para>
...
...
src/interfaces/libpq/fe-connect.c
浏览文件 @
18627c55
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.32
8 2006/03/14 22:48:23 tgl
Exp $
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.32
9 2006/05/17 21:50:54 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -3106,8 +3106,23 @@ PasswordFromFile(char *hostname, char *port, char *dbname, char *username)
if
(
username
==
NULL
||
strlen
(
username
)
==
0
)
return
NULL
;
/* 'localhost' matches pghost of '' or the default socket directory */
if
(
hostname
==
NULL
)
hostname
=
DefaultHost
;
else
if
(
is_absolute_path
(
hostname
))
{
char
canon_host
[
MAXPGPATH
];
char
canon_def_socket
[
MAXPGPATH
];
StrNCpy
(
canon_host
,
hostname
,
MAXPGPATH
);
StrNCpy
(
canon_def_socket
,
DEFAULT_PGSOCKET_DIR
,
MAXPGPATH
);
canonicalize_path
(
canon_host
);
canonicalize_path
(
canon_def_socket
);
if
(
strcmp
(
canon_host
,
canon_def_socket
)
==
0
)
hostname
=
DefaultHost
;
}
if
(
port
==
NULL
)
port
=
DEF_PGPORT_STR
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录