Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit680e4a2

Browse files
author
Thomas G. Lockhart
committed
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".
1 parent3d22596 commit680e4a2

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

‎src/bin/pg_dump/pg_dump.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*
2222
*
2323
* IDENTIFICATION
24-
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.93 1998/10/26 01:05:07 tgl Exp $
24+
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.94 1998/11/06 15:54:47 thomas Exp $
2525
*
2626
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
2727
*
@@ -139,6 +139,8 @@ usage(const char *progname)
139139
"\t -h hostname \t\t server host name\n");
140140
fprintf(stderr,
141141
"\t -n \t\t suppress most quotes around identifiers\n");
142+
fprintf(stderr,
143+
"\t -N \t\t enable most quotes around identifiers\n");
142144
fprintf(stderr,
143145
"\t -o \t\t dump object id's (oids)\n");
144146
fprintf(stderr,
@@ -560,7 +562,7 @@ main(int argc, char **argv)
560562

561563
progname=*argv;
562564

563-
while ((c=getopt(argc,argv,"adDf:h:nop:st:vzu"))!=EOF)
565+
while ((c=getopt(argc,argv,"adDf:h:nNop:st:vzu"))!=EOF)
564566
{
565567
switch (c)
566568
{
@@ -584,6 +586,9 @@ main(int argc, char **argv)
584586
case'n':/* Do not force double-quotes on identifiers */
585587
g_force_quotes= false;
586588
break;
589+
case'N':/* Force double-quotes on identifiers */
590+
g_force_quotes= true;
591+
break;
587592
case'o':/* Dump oids */
588593
oids=1;
589594
break;
@@ -2536,14 +2541,18 @@ dumpACL(FILE *fout, TableInfo tbinfo)
25362541

25372542
ACLlist=ParseACL(tbinfo.relacl,&l);
25382543
if (ACLlist== (ACL*)NULL)
2544+
{
25392545
if (l==0)
2546+
{
25402547
return;
2548+
}
25412549
else
25422550
{
25432551
fprintf(stderr,"Could not parse ACL list for '%s'...Exiting!\n",
25442552
tbinfo.relname);
25452553
exit_nicely(g_conn);
25462554
}
2555+
}
25472556

25482557
/* Revoke Default permissions for PUBLIC */
25492558
fprintf(fout,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp