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
This commit is contained in:
Bruce Momjian 2015-04-08 10:26:21 -04:00
parent 026fafde91
commit 90a8b1f82b
1 changed files with 10 additions and 0 deletions

View File

@ -4061,6 +4061,16 @@ parseServiceFile(const char *serviceFile,
}
*val++ = '\0';
if (strcmp(key, "service") == 0)
{
printfPQExpBuffer(errorMessage,
libpq_gettext("nested service specifications not supported in service file \"%s\", line %d\n"),
serviceFile,
linenr);
fclose(f);
return 3;
}
/*
* Set the parameter --- but don't override any previous
* explicit setting.