diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c index a7dc41c..979a964 100644 --- a/src/bin/pg_dump/pg_dumpall.c +++ b/src/bin/pg_dump/pg_dumpall.c @@ -111,6 +111,7 @@ main(int argc, char *argv[]) {"password", no_argument, NULL, 'W'}, {"no-privileges", no_argument, NULL, 'x'}, {"no-acl", no_argument, NULL, 'x'}, + {"exclude-table", required_argument, NULL, 'T'}, /* * the following options don't have an equivalent short option letter @@ -195,7 +196,7 @@ main(int argc, char *argv[]) pgdumpopts = createPQExpBuffer(); - while ((c = getopt_long(argc, argv, "acd:f:gh:l:oOp:rsS:tU:vwWx", long_options, &optindex)) != -1) + while ((c = getopt_long(argc, argv, "acd:f:gh:l:oOp:rsS:tU:vwWxT:", long_options, &optindex)) != -1) { switch (c) { @@ -283,6 +284,11 @@ main(int argc, char *argv[]) appendPQExpBufferStr(pgdumpopts, " -x"); break; + case 'T': + appendPQExpBufferStr(pgdumpopts, " -T"); + appendShellString(pgdumpopts, optarg); + break; + case 0: break; @@ -564,6 +570,7 @@ help(void) printf(_(" -s, --schema-only dump only the schema, no data\n")); printf(_(" -S, --superuser=NAME superuser user name to use in the dump\n")); printf(_(" -t, --tablespaces-only dump only tablespaces, no databases or roles\n")); + printf(_(" -T, --exclude-table exclude some tables\n")); printf(_(" -x, --no-privileges do not dump privileges (grant/revoke)\n")); printf(_(" --binary-upgrade for use by upgrade utilities only\n")); printf(_(" --column-inserts dump data as INSERT commands with column names\n")); --