Skip to content

Commit 90a8b1f

Browse files
committed
libpq: issue clear error message for nested service files
Previously an odd error message was generated. Nested service files are not supported. Report by David Johnston
1 parent 026fafd commit 90a8b1f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/interfaces/libpq/fe-connect.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4061,6 +4061,16 @@ parseServiceFile(const char *serviceFile,
40614061
}
40624062
*val++ = '\0';
40634063

4064+
if (strcmp(key, "service") == 0)
4065+
{
4066+
printfPQExpBuffer(errorMessage,
4067+
libpq_gettext("nested service specifications not supported in service file \"%s\", line %d\n"),
4068+
serviceFile,
4069+
linenr);
4070+
fclose(f);
4071+
return 3;
4072+
}
4073+
40644074
/*
40654075
* Set the parameter --- but don't override any previous
40664076
* explicit setting.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy