21
21
*
22
22
*
23
23
* IDENTIFICATION
24
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.112 1999/05/26 21:51:12 tgl Exp $
24
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.113 1999/05/27 16:29:03 momjian Exp $
25
25
*
26
26
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
27
27
*
@@ -116,7 +116,7 @@ bool dumpData; /* dump data using proper insert strings */
116
116
bool attrNames ; /* put attr names into insert strings */
117
117
bool schemaOnly ;
118
118
bool dataOnly ;
119
- bool aclsOption ;
119
+ bool aclsSkip ;
120
120
bool dropSchema ;
121
121
122
122
char g_opaque_type [10 ]; /* name for the opaque type */
@@ -549,7 +549,7 @@ main(int argc, char **argv)
549
549
char tmp_string [128 ];
550
550
char username [100 ];
551
551
char password [100 ];
552
- int use_password = 0 ;
552
+ bool use_password = false ;
553
553
554
554
g_verbose = false;
555
555
force_quotes = true;
@@ -563,7 +563,7 @@ main(int argc, char **argv)
563
563
564
564
progname = * argv ;
565
565
566
- while ((c = getopt (argc , argv , "acdDf:h:nNop:st:vzu " )) != EOF )
566
+ while ((c = getopt (argc , argv , "acdDf:h:nNop:st:uvxz " )) != EOF )
567
567
{
568
568
switch (c )
569
569
{
@@ -630,14 +630,19 @@ main(int argc, char **argv)
630
630
}
631
631
}
632
632
break ;
633
+ case 'u' :
634
+ use_password = true;
635
+ break ;
633
636
case 'v' : /* verbose */
634
637
g_verbose = true;
635
638
break ;
636
- case 'z ' : /* Dump ACLs and table ownership info */
637
- aclsOption = true;
639
+ case 'x ' : /* skip ACL dump */
640
+ aclsSkip = true;
638
641
break ;
639
- case 'u' :
640
- use_password = 1 ;
642
+ case 'z' : /* Old ACL option bjm 1999/05/27 */
643
+ fprintf (stderr ,
644
+ "%s: The -z option(dump ACLs) is now the default, continuing.\n" ,
645
+ progname );
641
646
break ;
642
647
default :
643
648
usage (progname );
@@ -726,10 +731,10 @@ main(int argc, char **argv)
726
731
if (g_verbose )
727
732
fprintf (stderr , "%s last builtin oid is %u %s\n" ,
728
733
g_comment_start , g_last_builtin_oid , g_comment_end );
729
- tblinfo = dumpSchema (g_fout , & numTables , tablename , aclsOption );
734
+ tblinfo = dumpSchema (g_fout , & numTables , tablename , aclsSkip );
730
735
}
731
736
else
732
- tblinfo = dumpSchema (NULL , & numTables , tablename , aclsOption );
737
+ tblinfo = dumpSchema (NULL , & numTables , tablename , aclsSkip );
733
738
734
739
if (!schemaOnly )
735
740
dumpClasses (tblinfo , numTables , g_fout , tablename , oids );
@@ -2689,7 +2694,7 @@ void
2689
2694
dumpTables (FILE * fout , TableInfo * tblinfo , int numTables ,
2690
2695
InhInfo * inhinfo , int numInherits ,
2691
2696
TypeInfo * tinfo , int numTypes , const char * tablename ,
2692
- const bool acls )
2697
+ const bool aclsSkip )
2693
2698
{
2694
2699
int i ,
2695
2700
j ,
@@ -2723,7 +2728,7 @@ dumpTables(FILE *fout, TableInfo *tblinfo, int numTables,
2723
2728
{
2724
2729
becomeUser (fout , tblinfo [i ].usename );
2725
2730
dumpSequence (fout , tblinfo [i ]);
2726
- if (acls )
2731
+ if (! aclsSkip )
2727
2732
dumpACL (fout , tblinfo [i ]);
2728
2733
}
2729
2734
}
@@ -2847,7 +2852,7 @@ dumpTables(FILE *fout, TableInfo *tblinfo, int numTables,
2847
2852
2848
2853
strcat (q , ";\n" );
2849
2854
fputs (q , fout );
2850
- if (acls )
2855
+ if (! aclsSkip )
2851
2856
dumpACL (fout , tblinfo [i ]);
2852
2857
2853
2858
}
@@ -3380,7 +3385,7 @@ becomeUser(FILE *fout, const char *username)
3380
3385
{
3381
3386
static const char * lastusername = "" ;
3382
3387
3383
- if (! aclsOption )
3388
+ if (aclsSkip )
3384
3389
return ;
3385
3390
3386
3391
if (strcmp (lastusername , username ) == 0 )
0 commit comments