|
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.134 2010/02/26 02:01:17 momjian Exp $ |
| 9 | + * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.135 2010/07/2201:22:34 rhaas Exp $ |
10 | 10 | *
|
11 | 11 | *-------------------------------------------------------------------------
|
12 | 12 | */
|
@@ -130,6 +130,7 @@ main(int argc, char *argv[])
|
130 | 130 | {"inserts",no_argument,&inserts,1},
|
131 | 131 | {"lock-wait-timeout",required_argument,NULL,2},
|
132 | 132 | {"no-tablespaces",no_argument,&no_tablespaces,1},
|
| 133 | +{"quote-all-identifiers",no_argument,"e_all_identifiers,1}, |
133 | 134 | {"role",required_argument,NULL,3},
|
134 | 135 | {"use-set-session-authorization",no_argument,&use_setsessauth,1},
|
135 | 136 |
|
@@ -328,6 +329,8 @@ main(int argc, char *argv[])
|
328 | 329 | appendPQExpBuffer(pgdumpopts," --inserts");
|
329 | 330 | if (no_tablespaces)
|
330 | 331 | appendPQExpBuffer(pgdumpopts," --no-tablespaces");
|
| 332 | +if (quote_all_identifiers) |
| 333 | +appendPQExpBuffer(pgdumpopts," --quote-all-identifiers"); |
331 | 334 | if (use_setsessauth)
|
332 | 335 | appendPQExpBuffer(pgdumpopts," --use-set-session-authorization");
|
333 | 336 |
|
@@ -440,6 +443,10 @@ main(int argc, char *argv[])
|
440 | 443 | destroyPQExpBuffer(query);
|
441 | 444 | }
|
442 | 445 |
|
| 446 | +/* Force quoting of all identifiers if requested. */ |
| 447 | +if (quote_all_identifiers&&server_version >=90000) |
| 448 | +executeCommand(conn,"SET quote_all_identifiers = true"); |
| 449 | + |
443 | 450 | fprintf(OPF,"--\n-- PostgreSQL database cluster dump\n--\n\n");
|
444 | 451 | if (verbose)
|
445 | 452 | dumpTimestamp("Started on");
|
|