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

Commitaf5be8b

Browse files
committed
The message style police pay a visit to hba.c.
1 parentb1993a6 commitaf5be8b

File tree

1 file changed

+18
-13
lines changed

1 file changed

+18
-13
lines changed

‎src/backend/libpq/hba.c

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/libpq/hba.c,v 1.206 2010/04/21 03:32:53 tgl Exp $
13+
* $PostgreSQL: pgsql/src/backend/libpq/hba.c,v 1.207 2010/05/26 16:43:13 tgl Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -711,7 +711,7 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline)
711711
ereport(LOG,
712712
(errcode(ERRCODE_CONFIG_FILE_ERROR),
713713
errmsg("hostssl not supported on this platform"),
714-
errhint("compile with --enable-ssl to use SSL connections"),
714+
errhint("Compile with --enable-ssl to use SSL connections."),
715715
errcontext("line %d of configuration file \"%s\"",
716716
line_num,HbaFileName)));
717717
return false;
@@ -890,8 +890,9 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline)
890890
{
891891
ereport(LOG,
892892
(errcode(ERRCODE_CONFIG_FILE_ERROR),
893-
errmsg("IP address and mask do not match in file \"%s\" line %d",
894-
HbaFileName,line_num)));
893+
errmsg("IP address and mask do not match"),
894+
errcontext("line %d of configuration file \"%s\"",
895+
line_num,HbaFileName)));
895896
return false;
896897
}
897898
}
@@ -944,7 +945,9 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline)
944945
{
945946
ereport(LOG,
946947
(errcode(ERRCODE_CONFIG_FILE_ERROR),
947-
errmsg("MD5 authentication is not supported when \"db_user_namespace\" is enabled")));
948+
errmsg("MD5 authentication is not supported when \"db_user_namespace\" is enabled"),
949+
errcontext("line %d of configuration file \"%s\"",
950+
line_num,HbaFileName)));
948951
return false;
949952
}
950953
parsedline->auth_method=uaMD5;
@@ -1086,7 +1089,7 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline)
10861089
ereport(LOG,
10871090
(errcode(ERRCODE_CONFIG_FILE_ERROR),
10881091
errmsg("client certificates can only be checked if a root certificate store is available"),
1089-
errdetail("make sure the root certificate storeis present and readable"),
1092+
errhint("Make sure the root.crt fileis present and readable."),
10901093
errcontext("line %d of configuration file \"%s\"",
10911094
line_num,HbaFileName)));
10921095
return false;
@@ -1245,7 +1248,8 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline)
12451248
{
12461249
ereport(LOG,
12471250
(errcode(ERRCODE_CONFIG_FILE_ERROR),
1248-
errmsg("unknown authentication option name: \"%s\"",token),
1251+
errmsg("unrecognized authentication option name: \"%s\"",
1252+
token),
12491253
errcontext("line %d of configuration file \"%s\"",
12501254
line_num,HbaFileName)));
12511255
return false;
@@ -1606,7 +1610,8 @@ parse_ident_usermap(List *line, int line_number, const char *usermap_name,
16061610
pg_regerror(r,&re,errstr,sizeof(errstr));
16071611
ereport(LOG,
16081612
(errcode(ERRCODE_INVALID_REGULAR_EXPRESSION),
1609-
errmsg("invalid regular expression \"%s\": %s",file_ident_user+1,errstr)));
1613+
errmsg("invalid regular expression \"%s\": %s",
1614+
file_ident_user+1,errstr)));
16101615

16111616
pfree(wstr);
16121617
*error_p= true;
@@ -1628,7 +1633,8 @@ parse_ident_usermap(List *line, int line_number, const char *usermap_name,
16281633
pg_regerror(r,&re,errstr,sizeof(errstr));
16291634
ereport(LOG,
16301635
(errcode(ERRCODE_INVALID_REGULAR_EXPRESSION),
1631-
errmsg("regular expression match for \"%s\" failed: %s",file_ident_user+1,errstr)));
1636+
errmsg("regular expression match for \"%s\" failed: %s",
1637+
file_ident_user+1,errstr)));
16321638
*error_p= true;
16331639
}
16341640

@@ -1773,9 +1779,8 @@ check_usermap(const char *usermap_name,
17731779
if (!found_entry&& !error)
17741780
{
17751781
ereport(LOG,
1776-
(errmsg("no match in usermap for user \"%s\" authenticated as \"%s\"",
1777-
pg_role,auth_user),
1778-
errcontext("usermap \"%s\"",usermap_name)));
1782+
(errmsg("no match in usermap \"%s\" for user \"%s\" authenticated as \"%s\"",
1783+
usermap_name,pg_role,auth_user)));
17791784
}
17801785
returnfound_entry ?STATUS_OK :STATUS_ERROR;
17811786
}
@@ -1798,7 +1803,7 @@ load_ident(void)
17981803
/* not fatal ... we just won't do any special ident maps */
17991804
ereport(LOG,
18001805
(errcode_for_file_access(),
1801-
errmsg("could not openIdentusermap file \"%s\": %m",
1806+
errmsg("could not open usermap file \"%s\": %m",
18021807
IdentFileName)));
18031808
}
18041809
else

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp