Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit27d18ff

Browse files
committed
Error message cleanup
1 parent5f9869d commit27d18ff

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

‎src/bin/pg_dump/pg_dump.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*by PostgreSQL
1313
*
1414
* IDENTIFICATION
15-
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.473 2007/10/13 20:18:41 tgl Exp $
15+
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.474 2007/11/07 13:11:05 petere Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -463,19 +463,19 @@ main(int argc, char **argv)
463463

464464
if (dataOnly&&schemaOnly)
465465
{
466-
write_msg(NULL,"options\"schemaonly\" (-s)and\"data only\" (-a) cannot be used together\n");
466+
write_msg(NULL,"options-s/--schema-onlyand-a/--data-only cannot be used together\n");
467467
exit(1);
468468
}
469469

470470
if (dataOnly&&outputClean)
471471
{
472-
write_msg(NULL,"options\"clean\" (-c) and\"data only\" (-a) cannot be used together\n");
472+
write_msg(NULL,"options-c/--clean and-a/--data-only cannot be used together\n");
473473
exit(1);
474474
}
475475

476476
if (dumpInserts== true&&oids== true)
477477
{
478-
write_msg(NULL,"INSERT (-d, -D) andOID (-o) options cannot be used together\n");
478+
write_msg(NULL,"options -d/-D/--inserts/--column-inserts and-o/--oids cannot be used together\n");
479479
write_msg(NULL,"(The INSERT command cannot set OIDs.)\n");
480480
exit(1);
481481
}
@@ -5524,7 +5524,7 @@ dumpEnumType(Archive *fout, TypeInfo *tinfo)
55245524
/* should be at least 1 value */
55255525
if (num==0)
55265526
{
5527-
write_msg(NULL,"No rowsfound for enum");
5527+
write_msg(NULL,"no label definitionsfound for enum ID %u",tinfo->dobj.catId.oid);
55285528
exit_nicely();
55295529
}
55305530

‎src/bin/pg_dump/pg_dumpall.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1994, Regents of the University of California
77
*
88
*
9-
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.95 2007/11/0712:24:24 petere Exp $
9+
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.96 2007/11/0713:11:05 petere Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -329,7 +329,7 @@ main(int argc, char *argv[])
329329
/* Make sure the user hasn't specified a mix of globals-only options */
330330
if (globals_only&&roles_only)
331331
{
332-
fprintf(stderr,_("%s:--globals-only and --roles-only cannot be used together\n"),
332+
fprintf(stderr,_("%s:options -g/--globals-only and-r/--roles-only cannot be used together\n"),
333333
progname);
334334
fprintf(stderr,_("Try \"%s --help\" for more information.\n"),
335335
progname);
@@ -338,7 +338,7 @@ main(int argc, char *argv[])
338338

339339
if (globals_only&&tablespaces_only)
340340
{
341-
fprintf(stderr,_("%s:--globals-only and --tablespaces-only cannot be used together\n"),
341+
fprintf(stderr,_("%s:options -g/--globals-only and-t/--tablespaces-only cannot be used together\n"),
342342
progname);
343343
fprintf(stderr,_("Try \"%s --help\" for more information.\n"),
344344
progname);
@@ -347,7 +347,7 @@ main(int argc, char *argv[])
347347

348348
if (roles_only&&tablespaces_only)
349349
{
350-
fprintf(stderr,_("%s:--roles-only and --tablespaces-only cannot be used together\n"),
350+
fprintf(stderr,_("%s:options -r/--roles-only and-t/--tablespaces-only cannot be used together\n"),
351351
progname);
352352
fprintf(stderr,_("Try \"%s --help\" for more information.\n"),
353353
progname);
@@ -382,7 +382,8 @@ main(int argc, char *argv[])
382382

383383
if (!conn)
384384
{
385-
fprintf(stderr,_("%s: could not connect to databases \"postgres\" or \"template1\". Please specify an alternative database\n"),
385+
fprintf(stderr,_("%s: could not connect to databases \"postgres\" or \"template1\"\n"
386+
"Please specify an alternative database.\n"),
386387
progname);
387388
fprintf(stderr,_("Try \"%s --help\" for more information.\n"),
388389
progname);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp