Commit
344cdff2c made failure to open the target of --output fatal.
For consistency, the --log-file switch should behave similarly.
Like the previous commit, back-patch to 9.5 but no further.
Daniel Verite
{
pset.logfile = fopen(options.logfilename, "a");
if (!pset.logfile)
+ {
fprintf(stderr, _("%s: could not open log file \"%s\": %s\n"),
pset.progname, options.logfilename, strerror(errno));
+ exit(EXIT_FAILURE);
+ }
}
if (!options.no_psqlrc)