]> granicus.if.org Git - postgresql/commitdiff
Remove ancient -X options to pg_dump, pg_dumpall, pg_restore.
authorRobert Haas <rhaas@postgresql.org>
Fri, 18 Mar 2011 13:44:44 +0000 (09:44 -0400)
committerRobert Haas <rhaas@postgresql.org>
Fri, 18 Mar 2011 13:44:44 +0000 (09:44 -0400)
The last version in which these options were documented is now EOL, so
it's time to get rid of them for real.  We now use GNU-style long
options instead.

src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dumpall.c
src/bin/pg_dump/pg_restore.c

index 546a04c95137392a84914db8cc36a7179fad8e4b..dadb5677c284c4121144af55faf34a5b0185c816 100644 (file)
@@ -468,35 +468,12 @@ main(int argc, char **argv)
                                aclsSkip = true;
                                break;
 
-                       case 'X':
-                               /*
-                                *      -X is a deprecated alternative to long options;
-                                *      no new -X options are to be added.
-                                */
-                               if (strcmp(optarg, "disable-dollar-quoting") == 0)
-                                       disable_dollar_quoting = 1;
-                               else if (strcmp(optarg, "disable-triggers") == 0)
-                                       disable_triggers = 1;
-                               else if (strcmp(optarg, "no-tablespaces") == 0)
-                                       outputNoTablespaces = 1;
-                               else if (strcmp(optarg, "use-set-session-authorization") == 0)
-                                       use_setsessauth = 1;
-                               else
-                               {
-                                       fprintf(stderr,
-                                                       _("%s: invalid -X option -- %s\n"),
-                                                       progname, optarg);
-                                       fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
-                                       exit(1);
-                               }
-                               break;
-
                        case 'Z':                       /* Compression Level */
                                compressLevel = atoi(optarg);
                                break;
 
                        case 0:
-                               /* This covers the long options equivalent to -X xxx. */
+                               /* This covers the long options. */
                                break;
 
                        case 2:                         /* lock-wait-timeout */
index 29282324a23d6878ca80acdbca6c8631e424a50e..13c4d9d818c33c910c89195e2d454a0b63f4b288 100644 (file)
@@ -280,30 +280,6 @@ main(int argc, char *argv[])
                                appendPQExpBuffer(pgdumpopts, " -x");
                                break;
 
-                       case 'X':
-                               /* -X is a deprecated alternative to long options */
-                               if (strcmp(optarg, "disable-dollar-quoting") == 0)
-                                       disable_dollar_quoting = 1;
-                               else if (strcmp(optarg, "disable-triggers") == 0)
-                                       disable_triggers = 1;
-                               else if (strcmp(optarg, "no-tablespaces") == 0)
-                                       no_tablespaces = 1;
-                               else if (strcmp(optarg, "use-set-session-authorization") == 0)
-                                       use_setsessauth = 1;
-                               else if (strcmp(optarg, "no-security-label") == 0)
-                                       no_security_label = 1;
-                               else if (strcmp(optarg, "no-unlogged-table-data") == 0)
-                                       no_unlogged_table_data = 1;
-                               else
-                               {
-                                       fprintf(stderr,
-                                                       _("%s: invalid -X option -- %s\n"),
-                                                       progname, optarg);
-                                       fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
-                                       exit(1);
-                               }
-                               break;
-
                        case 0:
                                break;
 
index 37793ad18fc1d077bfc623cb831d94b43d07cf01..f1440e2ace9b2f347b3e31dc14dd40d1e0dae007 100644 (file)
@@ -254,28 +254,6 @@ main(int argc, char **argv)
                                opts->aclsSkip = 1;
                                break;
 
-                       case 'X':
-                               /* -X is a deprecated alternative to long options */
-                               if (strcmp(optarg, "disable-triggers") == 0)
-                                       disable_triggers = 1;
-                               else if (strcmp(optarg, "no-data-for-failed-tables") == 0)
-                                       no_data_for_failed_tables = 1;
-                               else if (strcmp(optarg, "no-tablespaces") == 0)
-                                       outputNoTablespaces = 1;
-                               else if (strcmp(optarg, "use-set-session-authorization") == 0)
-                                       use_setsessauth = 1;
-                               else if (strcmp(optarg, "no-security-label") == 0)
-                                       skip_seclabel = 1;
-                               else
-                               {
-                                       fprintf(stderr,
-                                                       _("%s: invalid -X option -- %s\n"),
-                                                       progname, optarg);
-                                       fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
-                                       exit(1);
-                               }
-                               break;
-
                        case '1':                       /* Restore data in a single transaction */
                                opts->single_txn = true;
                                opts->exit_on_error = true;
@@ -284,8 +262,7 @@ main(int argc, char **argv)
                        case 0:
 
                                /*
-                                * This covers the long options without a short equivalent,
-                                * including those equivalent to -X xxx.
+                                * This covers the long options without a short equivalent.
                                 */
                                break;