Thread: pgsql: Improve error reporting when location specified by postgres -D d
Improve error reporting when location specified by postgres -D does not exist Previously, the first error seen would be that postgresql.conf does not exist. But for the case where the whole directory does not exist, give an error message about that, together with a hint for how to create one. Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/ac7238dc0faccb0ad077aa9922df6e75b0b1bda3 Modified Files -------------- src/backend/utils/misc/guc.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
Peter Eisentraut <peter_e@gmx.net> writes: > + if (configdir && stat(configdir, &stat_buf) != 0) > + { > + write_stderr("%s: could not access \"%s\": %s\n", > + progname, > + configdir, > + strerror(errno)); Perhaps "could not access directory ..."? This doesn't seem to follow the message style guideline about specifying what sort of object you're complaining about. regards, tom lane
Re: pgsql: Improve error reporting when location specified by postgres -D d
From
Peter Eisentraut
Date:
On 2/2/16 11:26 PM, Tom Lane wrote: > Peter Eisentraut <peter_e@gmx.net> writes: >> + if (configdir && stat(configdir, &stat_buf) != 0) >> + { >> + write_stderr("%s: could not access \"%s\": %s\n", >> + progname, >> + configdir, >> + strerror(errno)); > > Perhaps "could not access directory ..."? This doesn't seem to follow the > message style guideline about specifying what sort of object you're > complaining about. Done. Somehow I was under the mistaken impression that one could also specific a config file name there.