|
6 | 6 | * Portions Copyright (c) 1994, Regents of the University of California
|
7 | 7 | *
|
8 | 8 | *
|
9 |
| - * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.137 2010/08/03 19:24:05 tgl Exp $ |
| 9 | + * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.138 2010/08/13 14:38:04 tgl Exp $ |
10 | 10 | *
|
11 | 11 | *-------------------------------------------------------------------------
|
12 | 12 | */
|
@@ -316,24 +316,7 @@ main(int argc, char *argv[])
|
316 | 316 | }
|
317 | 317 | }
|
318 | 318 |
|
319 |
| - /* Add long options to the pg_dump argument list */ |
320 |
| - if (binary_upgrade) |
321 |
| - appendPQExpBuffer(pgdumpopts, " --binary-upgrade"); |
322 |
| - if (column_inserts) |
323 |
| - appendPQExpBuffer(pgdumpopts, " --column-inserts"); |
324 |
| - if (disable_dollar_quoting) |
325 |
| - appendPQExpBuffer(pgdumpopts, " --disable-dollar-quoting"); |
326 |
| - if (disable_triggers) |
327 |
| - appendPQExpBuffer(pgdumpopts, " --disable-triggers"); |
328 |
| - if (inserts) |
329 |
| - appendPQExpBuffer(pgdumpopts, " --inserts"); |
330 |
| - if (no_tablespaces) |
331 |
| - appendPQExpBuffer(pgdumpopts, " --no-tablespaces"); |
332 |
| - if (quote_all_identifiers) |
333 |
| - appendPQExpBuffer(pgdumpopts, " --quote-all-identifiers"); |
334 |
| - if (use_setsessauth) |
335 |
| - appendPQExpBuffer(pgdumpopts, " --use-set-session-authorization"); |
336 |
| - |
| 319 | + /* Complain if any arguments remain */ |
337 | 320 | if (optind < argc)
|
338 | 321 | {
|
339 | 322 | fprintf(stderr, _("%s: too many command-line arguments (first is \"%s\")\n"),
|
@@ -371,6 +354,24 @@ main(int argc, char *argv[])
|
371 | 354 | exit(1);
|
372 | 355 | }
|
373 | 356 |
|
| 357 | + /* Add long options to the pg_dump argument list */ |
| 358 | + if (binary_upgrade) |
| 359 | + appendPQExpBuffer(pgdumpopts, " --binary-upgrade"); |
| 360 | + if (column_inserts) |
| 361 | + appendPQExpBuffer(pgdumpopts, " --column-inserts"); |
| 362 | + if (disable_dollar_quoting) |
| 363 | + appendPQExpBuffer(pgdumpopts, " --disable-dollar-quoting"); |
| 364 | + if (disable_triggers) |
| 365 | + appendPQExpBuffer(pgdumpopts, " --disable-triggers"); |
| 366 | + if (inserts) |
| 367 | + appendPQExpBuffer(pgdumpopts, " --inserts"); |
| 368 | + if (no_tablespaces) |
| 369 | + appendPQExpBuffer(pgdumpopts, " --no-tablespaces"); |
| 370 | + if (quote_all_identifiers) |
| 371 | + appendPQExpBuffer(pgdumpopts, " --quote-all-identifiers"); |
| 372 | + if (use_setsessauth) |
| 373 | + appendPQExpBuffer(pgdumpopts, " --use-set-session-authorization"); |
| 374 | + |
374 | 375 | /*
|
375 | 376 | * If there was a database specified on the command line, use that,
|
376 | 377 | * otherwise try to connect to database "postgres", and failing that
|
|
0 commit comments