Handle some deprecated command line options

This commit is contained in:
Ian Barwick
2017-06-23 14:18:17 +09:00
parent 3e3607167c
commit 0823a83f92
2 changed files with 11 additions and 4 deletions

View File

@@ -435,8 +435,14 @@ main(int argc, char **argv)
/* options deprecated since 3.3 *
* ---------------------------- */
case OPT_DATA_DIR:
item_list_append(&cli_warnings,
_("--data-dir is deprecated; use -D/--pgdata instead"));
break;
case OPT_NO_CONNINFO_PASSWORD:
item_list_append(&cli_warnings,
_("--no-conninfo-password is deprecated; pasuse --use-recovery-conninfo-password to explicitly set a password"));
break;
}
}

View File

@@ -59,6 +59,7 @@
#define OPT_ALL 22
#define OPT_DRY_RUN 23
/* deprecated since 3.3 */
#define OPT_DATA_DIR 998
#define OPT_NO_CONNINFO_PASSWORD 999
@@ -85,8 +86,6 @@ static struct option long_options[] =
/* node options */
{"pgdata", required_argument, NULL, 'D'},
/* legacy alias for -D/--pgdata*/
{"data-dir", required_argument, NULL, 'D'},
{"node-id", required_argument, NULL, OPT_NODE_ID},
{"node-name", required_argument, NULL, OPT_NODE_NAME},
@@ -117,6 +116,8 @@ static struct option long_options[] =
/* deprecated */
{"no-conninfo-password", no_argument, NULL, OPT_NO_CONNINFO_PASSWORD},
/* legacy alias for -D/--pgdata*/
{"data-dir", required_argument, NULL, OPT_DATA_DIR},
/* not yet handled */
{"keep-history", required_argument, NULL, 'k'},