diff options
author | Thomas G. Lockhart <lockhart@fourpalms.org> | 1998-11-06 15:54:47 +0000 |
---|---|---|
committer | Thomas G. Lockhart <lockhart@fourpalms.org> | 1998-11-06 15:54:47 +0000 |
commit | 680e4a295090364e6753476aa9549f367b8a298c (patch) | |
tree | a2983c63a66fa944a40b13ac53ac02fc73de4f32 /src | |
parent | 3d22596fe79328bfd850f57df2e3130b3bba4d82 (diff) | |
download | postgresql-680e4a295090364e6753476aa9549f367b8a298c.tar.gz postgresql-680e4a295090364e6753476aa9549f367b8a298c.zip |
Add "-N" flag to force double quotes around identifiers.
This is the default, but the new flag will allow overriding an alias,
for example. So psql -n -N will put in the double quotes,
and psql -n can be an alias for psql.
Also, add a few braces around a nested single-line conditional construct
to suppress compiler warnings about "an ambiguous else".
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/pg_dump/pg_dump.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 6a2531010b8..5f022309af6 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -21,7 +21,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.93 1998/10/26 01:05:07 tgl Exp $ + * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.94 1998/11/06 15:54:47 thomas Exp $ * * Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb * @@ -140,6 +140,8 @@ usage(const char *progname) fprintf(stderr, "\t -n \t\t suppress most quotes around identifiers\n"); fprintf(stderr, + "\t -N \t\t enable most quotes around identifiers\n"); + fprintf(stderr, "\t -o \t\t dump object id's (oids)\n"); fprintf(stderr, "\t -p port \t\t server port number\n"); @@ -560,7 +562,7 @@ main(int argc, char **argv) progname = *argv; - while ((c = getopt(argc, argv, "adDf:h:nop:st:vzu")) != EOF) + while ((c = getopt(argc, argv, "adDf:h:nNop:st:vzu")) != EOF) { switch (c) { @@ -584,6 +586,9 @@ main(int argc, char **argv) case 'n': /* Do not force double-quotes on identifiers */ g_force_quotes = false; break; + case 'N': /* Force double-quotes on identifiers */ + g_force_quotes = true; + break; case 'o': /* Dump oids */ oids = 1; break; @@ -2536,14 +2541,18 @@ dumpACL(FILE *fout, TableInfo tbinfo) ACLlist = ParseACL(tbinfo.relacl, &l); if (ACLlist == (ACL *) NULL) + { if (l == 0) + { return; + } else { fprintf(stderr, "Could not parse ACL list for '%s'...Exiting!\n", tbinfo.relname); exit_nicely(g_conn); } + } /* Revoke Default permissions for PUBLIC */ fprintf(fout, |