Message style improvements

This commit is contained in:
Peter Eisentraut 2012-06-07 23:35:33 +03:00
parent e8d029a30b
commit 5d0109bd27
8 changed files with 11 additions and 11 deletions

View File

@ -2493,7 +2493,7 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION *processInfo)
processInfo)) processInfo))
{ {
fprintf(stderr, _("%s: could not start process for \"%s\": error code %lu\n"), progname, cmd, GetLastError()); fprintf(stderr, _("%s: could not start process for command \"%s\": error code %lu\n"), progname, cmd, GetLastError());
return 0; return 0;
} }
@ -2838,7 +2838,7 @@ main(int argc, char *argv[])
if (!CreateRestrictedProcess(cmdline, &pi)) if (!CreateRestrictedProcess(cmdline, &pi))
{ {
fprintf(stderr, _("%s: could not re-exec with restricted token: error code %lu\n"), progname, GetLastError()); fprintf(stderr, _("%s: could not re-execute with restricted token: error code %lu\n"), progname, GetLastError());
} }
else else
{ {

View File

@ -1926,7 +1926,7 @@ adjust_data_dir(void)
fd = popen(cmd, "r"); fd = popen(cmd, "r");
if (fd == NULL || fgets(filename, sizeof(filename), fd) == NULL) if (fd == NULL || fgets(filename, sizeof(filename), fd) == NULL)
{ {
write_stderr(_("%s: cannot find the data directory using %s\n"), progname, my_exec_path); write_stderr(_("%s: could not determine the data directory using \"%s\"\n"), progname, cmd);
exit(1); exit(1);
} }
pclose(fd); pclose(fd);

View File

@ -110,7 +110,7 @@ ParseCompressionOption(int compression, CompressionAlgorithm *alg, int *level)
*alg = COMPR_ALG_NONE; *alg = COMPR_ALG_NONE;
else else
{ {
exit_horribly(modulename, "Invalid compression code: %d\n", exit_horribly(modulename, "invalid compression code: %d\n",
compression); compression);
*alg = COMPR_ALG_NONE; /* keep compiler quiet */ *alg = COMPR_ALG_NONE; /* keep compiler quiet */
} }

View File

@ -1260,7 +1260,7 @@ set_dump_section(const char *arg, int *dumpSections)
*dumpSections |= DUMP_POST_DATA; *dumpSections |= DUMP_POST_DATA;
else else
{ {
fprintf(stderr, _("%s: unknown section name \"%s\")\n"), fprintf(stderr, _("%s: unrecognized section name: \"%s\"\n"),
progname, arg); progname, arg);
fprintf(stderr, _("Try \"%s --help\" for more information.\n"), fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
progname); progname);

View File

@ -407,8 +407,8 @@ _LoadBlobs(ArchiveHandle *AH, RestoreOptions *ropt)
char path[MAXPGPATH]; char path[MAXPGPATH];
if (sscanf(line, "%u %s\n", &oid, fname) != 2) if (sscanf(line, "%u %s\n", &oid, fname) != 2)
exit_horribly(modulename, "invalid line in large object TOC file: %s\n", exit_horribly(modulename, "invalid line in large object TOC file \"%s\": \"%s\"\n",
line); fname, line);
StartRestoreBlob(AH, oid, ropt->dropSchema); StartRestoreBlob(AH, oid, ropt->dropSchema);
snprintf(path, MAXPGPATH, "%s/%s", ctx->directory, fname); snprintf(path, MAXPGPATH, "%s/%s", ctx->directory, fname);
@ -667,7 +667,7 @@ prependDirectory(ArchiveHandle *AH, const char *relativeFilename)
dname = ctx->directory; dname = ctx->directory;
if (strlen(dname) + 1 + strlen(relativeFilename) + 1 > MAXPGPATH) if (strlen(dname) + 1 + strlen(relativeFilename) + 1 > MAXPGPATH)
exit_horribly(modulename, "path name too long: %s", dname); exit_horribly(modulename, "file name too long: \"%s\"", dname);
strcpy(buf, dname); strcpy(buf, dname);
strcat(buf, "/"); strcat(buf, "/");

View File

@ -993,7 +993,7 @@ repairDependencyLoop(DumpableObject **loop,
write_msg(NULL, "NOTICE: there are circular foreign-key constraints among these table(s):\n"); write_msg(NULL, "NOTICE: there are circular foreign-key constraints among these table(s):\n");
for (i = 0; i < nLoop; i++) for (i = 0; i < nLoop; i++)
write_msg(NULL, " %s\n", loop[i]->name); write_msg(NULL, " %s\n", loop[i]->name);
write_msg(NULL, "You may not be able to restore the dump without using --disable-triggers or temporarily dropping the constraints.\n"); write_msg(NULL, "You might not be able to restore the dump without using --disable-triggers or temporarily dropping the constraints.\n");
write_msg(NULL, "Consider using a full dump instead of a --data-only dump to avoid this problem.\n"); write_msg(NULL, "Consider using a full dump instead of a --data-only dump to avoid this problem.\n");
if (nLoop > 1) if (nLoop > 1)
removeObjectDependency(loop[0], loop[1]->dumpId); removeObjectDependency(loop[0], loop[1]->dumpId);

View File

@ -570,7 +570,7 @@ PrintControlValues(bool guessed)
sysident_str); sysident_str);
printf(_("Latest checkpoint's TimeLineID: %u\n"), printf(_("Latest checkpoint's TimeLineID: %u\n"),
ControlFile.checkPointCopy.ThisTimeLineID); ControlFile.checkPointCopy.ThisTimeLineID);
printf(_("Latest checkpoint's full_page_writes: %s\n"), printf(_("Latest checkpoint's full_page_writes: %s\n"),
ControlFile.checkPointCopy.fullPageWrites ? _("on") : _("off")); ControlFile.checkPointCopy.fullPageWrites ? _("on") : _("off"));
printf(_("Latest checkpoint's NextXID: %u/%u\n"), printf(_("Latest checkpoint's NextXID: %u/%u\n"),
ControlFile.checkPointCopy.nextXidEpoch, ControlFile.checkPointCopy.nextXidEpoch,

View File

@ -1114,7 +1114,7 @@ exec_command(const char *cmd,
} }
else if (strchr(envvar,'=') != NULL) else if (strchr(envvar,'=') != NULL)
{ {
psql_error("\\%s: environment variable name must not contain '='\n", psql_error("\\%s: environment variable name must not contain \"=\"\n",
cmd); cmd);
success = false; success = false;
} }