Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd0f9ca3

Browse files
committed
Remove canonicalize_path() call for .pgpass socket directory comparison;
not worth adding path.c to libpq.
1 parent0622821 commitd0f9ca3

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

‎src/interfaces/libpq/fe-connect.c

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.329 2006/05/17 21:50:54 momjian Exp $
11+
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.330 2006/05/18 16:26:44 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -3110,19 +3110,13 @@ PasswordFromFile(char *hostname, char *port, char *dbname, char *username)
31103110
if (hostname==NULL)
31113111
hostname=DefaultHost;
31123112
elseif (is_absolute_path(hostname))
3113-
{
3114-
charcanon_host[MAXPGPATH];
3115-
charcanon_def_socket[MAXPGPATH];
3116-
3117-
StrNCpy(canon_host,hostname,MAXPGPATH);
3118-
StrNCpy(canon_def_socket,DEFAULT_PGSOCKET_DIR,MAXPGPATH);
3119-
3120-
canonicalize_path(canon_host);
3121-
canonicalize_path(canon_def_socket);
3122-
3123-
if (strcmp(canon_host,canon_def_socket)==0)
3113+
/*
3114+
*We should probably use canonicalize_path(), but then
3115+
*we have to bring path.c into libpq, and it doesn't
3116+
*seem worth it.
3117+
*/
3118+
if (strcmp(hostname,DEFAULT_PGSOCKET_DIR)==0)
31243119
hostname=DefaultHost;
3125-
}
31263120

31273121
if (port==NULL)
31283122
port=DEF_PGPORT_STR;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp