|
34 | 34 | * |
35 | 35 | * |
36 | 36 | * IDENTIFICATION |
37 | | - *$PostgreSQL: pgsql/src/bin/pg_dump/pg_restore.c,v 1.85 2007/12/11 19:01:06 tgl Exp $ |
| 37 | + *$PostgreSQL: pgsql/src/bin/pg_dump/pg_restore.c,v 1.86 2008/03/20 17:36:58 tgl Exp $ |
38 | 38 | * |
39 | 39 | *------------------------------------------------------------------------- |
40 | 40 | */ |
@@ -74,9 +74,10 @@ main(int argc, char **argv) |
74 | 74 | char*inputFileSpec; |
75 | 75 | externintoptind; |
76 | 76 | externchar*optarg; |
77 | | -staticintuse_setsessauth=0; |
78 | 77 | staticintdisable_triggers=0; |
79 | 78 | staticintno_data_for_failed_tables=0; |
| 79 | +staticintoutputNoTablespaces=0; |
| 80 | +staticintuse_setsessauth=0; |
80 | 81 |
|
81 | 82 | structoptioncmdopts[]= { |
82 | 83 | {"clean",0,NULL,'c'}, |
@@ -110,9 +111,10 @@ main(int argc, char **argv) |
110 | 111 | /* |
111 | 112 | * the following options don't have an equivalent short option letter |
112 | 113 | */ |
113 | | -{"use-set-session-authorization",no_argument,&use_setsessauth,1}, |
114 | 114 | {"disable-triggers",no_argument,&disable_triggers,1}, |
115 | 115 | {"no-data-for-failed-tables",no_argument,&no_data_for_failed_tables,1}, |
| 116 | +{"no-tablespaces",no_argument,&outputNoTablespaces,1}, |
| 117 | +{"use-set-session-authorization",no_argument,&use_setsessauth,1}, |
116 | 118 |
|
117 | 119 | {NULL,0,NULL,0} |
118 | 120 | }; |
@@ -241,10 +243,14 @@ main(int argc, char **argv) |
241 | 243 |
|
242 | 244 | case'X': |
243 | 245 | /* -X is a deprecated alternative to long options */ |
244 | | -if (strcmp(optarg,"use-set-session-authorization")==0) |
245 | | -use_setsessauth=1; |
246 | | -elseif (strcmp(optarg,"disable-triggers")==0) |
| 246 | +if (strcmp(optarg,"disable-triggers")==0) |
247 | 247 | disable_triggers=1; |
| 248 | +elseif (strcmp(optarg,"no-data-for-failed-tables")==0) |
| 249 | +no_data_for_failed_tables=1; |
| 250 | +elseif (strcmp(optarg,"no-tablespaces")==0) |
| 251 | +outputNoTablespaces=1; |
| 252 | +elseif (strcmp(optarg,"use-set-session-authorization")==0) |
| 253 | +use_setsessauth=1; |
248 | 254 | else |
249 | 255 | { |
250 | 256 | fprintf(stderr, |
@@ -290,8 +296,9 @@ main(int argc, char **argv) |
290 | 296 | } |
291 | 297 |
|
292 | 298 | opts->disable_triggers=disable_triggers; |
293 | | -opts->use_setsessauth=use_setsessauth; |
294 | 299 | opts->noDataForFailedTables=no_data_for_failed_tables; |
| 300 | +opts->noTablespace=outputNoTablespaces; |
| 301 | +opts->use_setsessauth=use_setsessauth; |
295 | 302 |
|
296 | 303 | if (opts->formatName) |
297 | 304 | { |
@@ -395,12 +402,13 @@ usage(const char *progname) |
395 | 402 | printf(_(" -T, --trigger=NAME restore named trigger\n")); |
396 | 403 | printf(_(" -x, --no-privileges skip restoration of access privileges (grant/revoke)\n")); |
397 | 404 | printf(_(" --disable-triggers disable triggers during data-only restore\n")); |
398 | | -printf(_(" --use-set-session-authorization\n" |
399 | | -" use SESSION AUTHORIZATION commands instead of\n" |
400 | | -" OWNER TO commands\n")); |
401 | 405 | printf(_(" --no-data-for-failed-tables\n" |
402 | 406 | " do not restore data of tables that could not be\n" |
403 | 407 | " created\n")); |
| 408 | +printf(_(" --no-tablespaces do not dump tablespace assignments\n")); |
| 409 | +printf(_(" --use-set-session-authorization\n" |
| 410 | +" use SESSION AUTHORIZATION commands instead of\n" |
| 411 | +" OWNER TO commands\n")); |
404 | 412 | printf(_(" -1, --single-transaction\n" |
405 | 413 | " restore as a single transaction\n")); |
406 | 414 |
|
|