2121 *
2222 *
2323 * 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 $
2525 *
2626 * Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
2727 *
@@ -116,7 +116,7 @@ booldumpData;/* dump data using proper insert strings */
116116bool attrNames ;/* put attr names into insert strings */
117117bool schemaOnly ;
118118bool dataOnly ;
119- bool aclsOption ;
119+ bool aclsSkip ;
120120bool dropSchema ;
121121
122122char g_opaque_type [10 ];/* name for the opaque type */
@@ -549,7 +549,7 @@ main(int argc, char **argv)
549549char tmp_string [128 ];
550550char username [100 ];
551551char password [100 ];
552- int use_password = 0 ;
552+ bool use_password = false ;
553553
554554g_verbose = false;
555555force_quotes = true;
@@ -563,7 +563,7 @@ main(int argc, char **argv)
563563
564564progname = * argv ;
565565
566- while ((c = getopt (argc ,argv ,"acdDf:h:nNop:st:vzu " ))!= EOF )
566+ while ((c = getopt (argc ,argv ,"acdDf:h:nNop:st:uvxz " ))!= EOF )
567567{
568568switch (c )
569569{
@@ -630,14 +630,19 @@ main(int argc, char **argv)
630630}
631631}
632632break ;
633+ case 'u' :
634+ use_password = true;
635+ break ;
633636case 'v' :/* verbose */
634637g_verbose = true;
635638break ;
636- case 'z ' :/*Dump ACLs and table ownership info */
637- aclsOption = true;
639+ case 'x ' :/*skip ACL dump */
640+ aclsSkip = true;
638641break ;
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 );
641646break ;
642647default :
643648usage (progname );
@@ -726,10 +731,10 @@ main(int argc, char **argv)
726731if (g_verbose )
727732fprintf (stderr ,"%s last builtin oid is %u %s\n" ,
728733g_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 );
730735}
731736else
732- tblinfo = dumpSchema (NULL ,& numTables ,tablename ,aclsOption );
737+ tblinfo = dumpSchema (NULL ,& numTables ,tablename ,aclsSkip );
733738
734739if (!schemaOnly )
735740dumpClasses (tblinfo ,numTables ,g_fout ,tablename ,oids );
@@ -2689,7 +2694,7 @@ void
26892694dumpTables (FILE * fout ,TableInfo * tblinfo ,int numTables ,
26902695InhInfo * inhinfo ,int numInherits ,
26912696TypeInfo * tinfo ,int numTypes ,const char * tablename ,
2692- const bool acls )
2697+ const bool aclsSkip )
26932698{
26942699int i ,
26952700j ,
@@ -2723,7 +2728,7 @@ dumpTables(FILE *fout, TableInfo *tblinfo, int numTables,
27232728{
27242729becomeUser (fout ,tblinfo [i ].usename );
27252730dumpSequence (fout ,tblinfo [i ]);
2726- if (acls )
2731+ if (! aclsSkip )
27272732dumpACL (fout ,tblinfo [i ]);
27282733}
27292734}
@@ -2847,7 +2852,7 @@ dumpTables(FILE *fout, TableInfo *tblinfo, int numTables,
28472852
28482853strcat (q ,";\n" );
28492854fputs (q ,fout );
2850- if (acls )
2855+ if (! aclsSkip )
28512856dumpACL (fout ,tblinfo [i ]);
28522857
28532858}
@@ -3380,7 +3385,7 @@ becomeUser(FILE *fout, const char *username)
33803385{
33813386static const char * lastusername = "" ;
33823387
3383- if (! aclsOption )
3388+ if (aclsSkip )
33843389return ;
33853390
33863391if (strcmp (lastusername ,username )== 0 )