Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
448950b3
Commit
448950b3
authored
Sep 15, 2008
by
Magnus Hagander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix error messages from recent pg_hba parsing patch to use errcontext()
to indicate where the error occurred.
parent
4adc2f72
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
16 deletions
+18
-16
src/backend/libpq/hba.c
src/backend/libpq/hba.c
+18
-16
No files found.
src/backend/libpq/hba.c
View file @
448950b3
...
...
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/libpq/hba.c,v 1.16
7 2008/09/15 12:32:56
mha Exp $
* $PostgreSQL: pgsql/src/backend/libpq/hba.c,v 1.16
8 2008/09/15 20:55:04
mha Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -660,8 +660,8 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline)
(
errcode
(
ERRCODE_CONFIG_FILE_ERROR
),
errmsg
(
"invalid IP address
\"
%s
\"
: %s"
,
token
,
gai_strerror
(
ret
)),
err
detail
(
"In file
\"
%s
\"
, line %d
"
,
HbaFileName
,
line_num
)));
err
context
(
"line %d of configuration file
\"
%s
\"
"
,
line_num
,
HbaFileName
)));
if
(
cidr_slash
)
*
cidr_slash
=
'/'
;
if
(
gai_result
)
...
...
@@ -697,8 +697,8 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline)
(
errcode
(
ERRCODE_CONFIG_FILE_ERROR
),
errmsg
(
"invalid IP mask
\"
%s
\"
: %s"
,
token
,
gai_strerror
(
ret
)),
err
detail
(
"In file
\"
%s
\"
, line %d
"
,
HbaFileName
,
line_num
)));
err
context
(
"line %d of configuration file
\"
%s
\"
"
,
line_num
,
HbaFileName
)));
if
(
gai_result
)
pg_freeaddrinfo_all
(
hints
.
ai_family
,
gai_result
);
goto
hba_other_error
;
...
...
@@ -773,8 +773,8 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline)
(
errcode
(
ERRCODE_CONFIG_FILE_ERROR
),
errmsg
(
"invalid authentication method
\"
%s
\"
"
,
token
),
err
detail
(
"In file
\"
%s
\"
line %d
"
,
HbaFileName
,
line_num
)));
err
context
(
"line %d of configuration file
\"
%s
\"
"
,
line_num
,
HbaFileName
)));
goto
hba_other_error
;
}
...
...
@@ -784,8 +784,8 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline)
(
errcode
(
ERRCODE_CONFIG_FILE_ERROR
),
errmsg
(
"invalid authentication method
\"
%s
\"
: not supported on this platform"
,
token
),
err
detail
(
"In file
\"
%s
\"
line %d
"
,
HbaFileName
,
line_num
)));
err
context
(
"line %d of configuration file
\"
%s
\"
"
,
line_num
,
HbaFileName
)));
goto
hba_other_error
;
}
...
...
@@ -796,8 +796,8 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline)
ereport
(
LOG
,
(
errcode
(
ERRCODE_CONFIG_FILE_ERROR
),
errmsg
(
"krb5 authentication is not supported on local sockets"
),
err
detail
(
"In file
\"
%s
\"
line %d
"
,
HbaFileName
,
line_num
)));
err
context
(
"line %d of configuration file
\"
%s
\"
"
,
line_num
,
HbaFileName
)));
goto
hba_other_error
;
}
...
...
@@ -840,14 +840,16 @@ hba_syntax:
if
(
line_item
)
ereport
(
LOG
,
(
errcode
(
ERRCODE_CONFIG_FILE_ERROR
),
errmsg
(
"invalid entry in file
\"
%s
\"
at line %d, token
\"
%s
\"
"
,
HbaFileName
,
line_num
,
(
char
*
)
lfirst
(
line_item
))));
errmsg
(
"invalid token
\"
%s
\"
"
,
(
char
*
)
lfirst
(
line_item
)),
errcontext
(
"line %d of configuration file
\"
%s
\"
"
,
line_num
,
HbaFileName
)));
else
ereport
(
LOG
,
(
errcode
(
ERRCODE_CONFIG_FILE_ERROR
),
errmsg
(
"missing field in file
\"
%s
\"
at end of line %d"
,
HbaFileName
,
line_num
)));
errmsg
(
"missing field at end of line"
),
errcontext
(
"line %d of configuration file
\"
%s
\"
"
,
line_num
,
HbaFileName
)));
/* Come here if suitable message already logged */
hba_other_error:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment