Error message cleanup
authorPeter Eisentraut <peter_e@gmx.net>
Wed, 7 Nov 2007 13:11:05 +0000 (13:11 +0000)
committerPeter Eisentraut <peter_e@gmx.net>
Wed, 7 Nov 2007 13:11:05 +0000 (13:11 +0000)
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dumpall.c

index c572c5069e8f252ca55d6bc2d890698a4cf3a56b..b38bf34437592b8545e48b1613e639297dea336d 100644 (file)
@@ -463,19 +463,19 @@ main(int argc, char **argv)
 
        if (dataOnly && schemaOnly)
        {
-               write_msg(NULL, "options \"schema only\" (-s) and \"data only\" (-a) cannot be used together\n");
+               write_msg(NULL, "options -s/--schema-only and -a/--data-only cannot be used together\n");
                exit(1);
        }
 
        if (dataOnly && outputClean)
        {
-               write_msg(NULL, "options \"clean\" (-c) and \"data only\" (-a) cannot be used together\n");
+               write_msg(NULL, "options -c/--clean and -a/--data-only cannot be used together\n");
                exit(1);
        }
 
        if (dumpInserts == true && oids == true)
        {
-               write_msg(NULL, "INSERT (-d, -D) and OID (-o) options cannot be used together\n");
+               write_msg(NULL, "options -d/-D/--inserts/--column-inserts and -o/--oids cannot be used together\n");
                write_msg(NULL, "(The INSERT command cannot set OIDs.)\n");
                exit(1);
        }
@@ -5524,7 +5524,7 @@ dumpEnumType(Archive *fout, TypeInfo *tinfo)
        /* should be at least 1 value */
        if (num == 0)
        {
-               write_msg(NULL, "No rows found for enum");
+               write_msg(NULL, "no label definitions found for enum ID %u", tinfo->dobj.catId.oid);
                exit_nicely();
        }
 
index 8b16711d4f910ee16cb6cb5da00ace0ea218faa7..3fc64309f54d81daea22a2c21c9dda0839569b2a 100644 (file)
@@ -329,7 +329,7 @@ main(int argc, char *argv[])
        /* Make sure the user hasn't specified a mix of globals-only options */
        if (globals_only && roles_only)
        {
-               fprintf(stderr, _("%s: --globals-only and --roles-only cannot be used together\n"),
+               fprintf(stderr, _("%s: options -g/--globals-only and -r/--roles-only cannot be used together\n"),
                                progname);
                fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
                                progname);
@@ -338,7 +338,7 @@ main(int argc, char *argv[])
        
        if (globals_only && tablespaces_only)
        {
-               fprintf(stderr, _("%s: --globals-only and --tablespaces-only cannot be used together\n"),
+               fprintf(stderr, _("%s: options -g/--globals-only and -t/--tablespaces-only cannot be used together\n"),
                                progname);
                fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
                                progname);
@@ -347,7 +347,7 @@ main(int argc, char *argv[])
        
        if (roles_only && tablespaces_only)
        {
-               fprintf(stderr, _("%s: --roles-only and --tablespaces-only cannot be used together\n"),
+               fprintf(stderr, _("%s: options -r/--roles-only and -t/--tablespaces-only cannot be used together\n"),
                                progname);
                fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
                                progname);
@@ -382,7 +382,8 @@ main(int argc, char *argv[])
                                
                if (!conn)
                {
-                       fprintf(stderr, _("%s: could not connect to databases \"postgres\" or \"template1\". Please specify an alternative database\n"),
+                       fprintf(stderr, _("%s: could not connect to databases \"postgres\" or \"template1\"\n"
+                                         "Please specify an alternative database.\n"),
                                        progname);
                        fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
                                        progname);