? pg_dump.options.diff
? po/cs.mo
? po/de.mo
? po/ru.mo
? po/sv.mo
? po/zh_CN.mo
? po/zh_TW.mo
Index: pg_dump.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/bin/pg_dump/pg_dump.c,v
retrieving revision 1.313
diff -c -r1.313 pg_dump.c
*** pg_dump.c	2002/12/27 17:10:45	1.313
--- pg_dump.c	2003/01/02 05:42:30
***************
*** 650,745 ****
  }
  
  
  static void
  help(const char *progname)
  {
  	printf(_("%s dumps a database as a text file or to other formats.\n\n"), progname);
  	printf(_("Usage:\n"));
  	printf(_("  %s [OPTION]... [DBNAME]\n"), progname);
  
  	printf(_("\nGeneral options:\n"));
  #ifdef HAVE_GETOPT_LONG
! 	printf(_("  -f, --file=FILENAME      output file name\n"));
! 	printf(_("  -F, --format=c|t|p       output file format (custom, tar, plain text)\n"));
! 	printf(_("  -i, --ignore-version     proceed even when server version mismatches\n"
! 			 "                           pg_dump version\n"));
! 	printf(_("  -v, --verbose            verbose mode\n"));
! 	printf(_("  -Z, --compress=0-9       compression level for compressed formats\n"));
  #else /* not HAVE_GETOPT_LONG */
! 	printf(_("  -f FILENAME              output file name\n"));
! 	printf(_("  -F c|t|p                 output file format (custom, tar, plain text)\n"));
! 	printf(_("  -i                       proceed even when server version mismatches\n"
! 			 "                           pg_dump version\n"));
! 	printf(_("  -v                       verbose mode\n"));
! 	printf(_("  -Z 0-9                   compression level for compressed formats\n"));
  #endif /* not HAVE_GETOPT_LONG */
  	printf(_("  --help                   show this help, then exit\n"));
  	printf(_("  --version                output version information, then exit\n"));
  
  	printf(_("\nOptions controlling the output content:\n"));
  #ifdef HAVE_GETOPT_LONG
! 	printf(_("  -a, --data-only          dump only the data, not the schema\n"));
! 	printf(_("  -b, --blobs              include large objects in dump\n"));
! 	printf(_("  -c, --clean              clean (drop) schema prior to create\n"));
! 	printf(_("  -C, --create             include commands to create database in dump\n"));
! 	printf(_("  -d, --inserts            dump data as INSERT, rather than COPY, commands\n"));
! 	printf(_("  -D, --column-inserts     dump data as INSERT commands with column names\n"));
! 	printf(_("  -o, --oids               include OIDs in dump\n"));
! 	printf(_("  -O, --no-owner           do not output \\connect commands in plain\n"
! 			 "                           text format\n"));
! 	printf(_("  -R, --no-reconnect       disable ALL reconnections to the database in\n"
! 			 "                           plain text format\n"));
! 	printf(_("  -s, --schema-only        dump only the schema, no data\n"));
! 	printf(_("  -S, --superuser=NAME     specify the superuser user name to use in\n"
! 			 "                           plain text format\n"));
! 	printf(_("  -t, --table=TABLE        dump this table only (* for all)\n"));
! 	printf(_("  -x, --no-privileges      do not dump privileges (grant/revoke)\n"));
! 	printf(_("  -X use-set-session-authorization, --use-set-session-authorization\n"
! 			 "                           output SET SESSION AUTHORIZATION commands rather\n"
! 			 "                           than \\connect commands\n"));
! 	printf(_("  -X disable-triggers, --disable-triggers\n"
! 			 "                           disable triggers during data-only restore\n"));
  #else /* not HAVE_GETOPT_LONG */
! 	printf(_("  -a                       dump only the data, not the schema\n"));
! 	printf(_("  -b                       include large objects in dump\n"));
! 	printf(_("  -c                       clean (drop) schema prior to create\n"));
! 	printf(_("  -C                       include commands to create database in dump\n"));
! 	printf(_("  -d                       dump data as INSERT, rather than COPY, commands\n"));
! 	printf(_("  -D                       dump data as INSERT commands with column names\n"));
! 	printf(_("  -o                       include OIDs in dump\n"));
! 	printf(_("  -O                       do not output \\connect commands in plain\n"
! 			 "                           text format\n"));
! 	printf(_("  -R                       disable ALL reconnections to the database in\n"
! 			 "                           plain text format\n"));
! 	printf(_("  -s                       dump only the schema, no data\n"));
! 	printf(_("  -S NAME                  specify the superuser user name to use in\n"
! 			 "                           plain text format\n"));
! 	printf(_("  -t TABLE                 dump this table only (* for all)\n"));
! 	printf(_("  -x                       do not dump privileges (grant/revoke)\n"));
! 	printf(_("  -X use-set-session-authorization\n"
! 			 "                           output SET SESSION AUTHORIZATION commands rather\n"
! 			 "                           than \\connect commands\n"));
! 	printf(_("  -X disable-triggers      disable triggers during data-only restore\n"));
  #endif /* not HAVE_GETOPT_LONG */
  
  	printf(_("\nConnection options:\n"));
  #ifdef HAVE_GETOPT_LONG
! 	printf(_("  -h, --host=HOSTNAME      database server host name\n"));
! 	printf(_("  -p, --port=PORT          database server port number\n"));
! 	printf(_("  -U, --username=NAME      connect as specified database user\n"));
! 	printf(_("  -W, --password           force password prompt (should happen automatically)\n"));
  #else /* not HAVE_GETOPT_LONG */
! 	printf(_("  -h HOSTNAME              database server host name\n"));
! 	printf(_("  -p PORT                  database server port number\n"));
! 	printf(_("  -U NAME                  connect as specified database user\n"));
! 	printf(_("  -W                       force password prompt (should happen automatically)\n"));
  #endif /* not HAVE_GETOPT_LONG */
  
  	printf(_("\nIf no database name is not supplied, then the PGDATABASE environment\n"
  			 "variable value is used.\n\n"));
  	printf(_("Report bugs to <pgsql-bugs@postgresql.org>.\n"));
  }
  
  void
  exit_nicely(void)
  {
--- 650,798 ----
  }
  
  
+ /*
+  * help: displays pg_dump's usage options
+  */
  static void
  help(const char *progname)
  {
+ 	char* SPACES =   "                      ";
+ 
  	printf(_("%s dumps a database as a text file or to other formats.\n\n"), progname);
  	printf(_("Usage:\n"));
  	printf(_("  %s [OPTION]... [DBNAME]\n"), progname);
  
+ 	/* General Options */
+ 
  	printf(_("\nGeneral options:\n"));
+ 
  #ifdef HAVE_GETOPT_LONG
! 
! 	char* f_LONG = _(", --file=FILENAME     ");
! 	char* F_LONG = _(", --format=c|t|p      ");
! 	char* i_LONG = _(", --ignore-version    ");
! 	char* v_LONG = _(", --verbose           ");
! 	char* Z_LONG = _(", --compress=0-9      ");
! 
  #else /* not HAVE_GETOPT_LONG */
! 
! 	char* f_LONG = _(" FILENAME             ");
! 	char* F_LONG = _(" c|t|p                ");
! 	char* i_LONG = SPACES;
! 	char* v_LONG = SPACES;
! 	char* Z_LONG = _(" 0-9                  ");
! 
  #endif /* not HAVE_GETOPT_LONG */
+ 
+ 	printf(_("  -f%s output file name\n"), f_LONG);
+ 	printf(_("  -F%s output file format (custom, tar, plain text)\n"), F_LONG);
+ 	printf(_("  -i%s proceed even when server version mismatches\n"
+ 			 "    %s pg_dump version\n"), i_LONG, SPACES);
+ 	printf(_("  -v%s verbose mode\n"), v_LONG);
+ 	printf(_("  -Z%s compression level for compressed formats\n"), Z_LONG);
+ 
+ 
  	printf(_("  --help                   show this help, then exit\n"));
  	printf(_("  --version                output version information, then exit\n"));
  
+ 
+ 	/* Output Options */
+ 
  	printf(_("\nOptions controlling the output content:\n"));
+ 
  #ifdef HAVE_GETOPT_LONG
! 
! 	char* a_LONG  = _(", --data-only         ");
! 	char* b_LONG  = _(", --blobs             ");
! 	char* c_LONG  = _(", --clean             ");
! 	char* C_LONG  = _(", --create            ");
! 	char* d_LONG  = _(", --inserts           ");
! 	char* D_LONG  = _(", --column-inserts    ");
! 	char* o_LONG  = _(", --oids              ");
! 	char* O_LONG  = _(", --no-owner          ");
! 	char* R_LONG  = _(", --no-reconnect      ");
! 	char* s_LONG  = _(", --schema-only       ");
! 	char* S_LONG  = _(", --superuser=NAME    ");
! 	char* t_LONG  = _(", --table=TABLE       ");
! 	char* x_LONG  = _(", --no-privileges     ");
! 	char* X1_LONG = _(" use-set-session-authorization, --use-set-session-authorization");
! 	char* X2_LONG = _(" disable-triggers, --disable-triggers");
! 
  #else /* not HAVE_GETOPT_LONG */
! 
! 	char* a_LONG  = SPACES;
! 	char* b_LONG  = SPACES;
! 	char* c_LONG  = SPACES;
! 	char* C_LONG  = SPACES;
! 	char* d_LONG  = SPACES;
! 	char* D_LONG  = SPACES;
! 	char* o_LONG  = SPACES;
! 	char* O_LONG  = SPACES;
! 	char* R_LONG  = SPACES;
! 	char* s_LONG  = SPACES;
! 	char* S_LONG  = _(" NAME                  ");
! 	char* t_LONG  = _(" TABLE                 ");
! 	char* x_LONG  = SPACES;
! 	char* X1_LONG = _(" use-set-session-authorization");
! 	char* X2_LONG = _(" disable-triggers");
! 
  #endif /* not HAVE_GETOPT_LONG */
  
+ 	printf(_("  -a%s dump only the data, not the schema\n"), a_LONG);
+ 	printf(_("  -b%s include large objects in dump\n"), b_LONG);
+ 	printf(_("  -c%s clean (drop) schema prior to create\n"), c_LONG);
+ 	printf(_("  -C%s include commands to create database in dump\n"), C_LONG);
+ 	printf(_("  -d%s dump data as INSERT, rather than COPY, commands\n"), d_LONG);
+ 	printf(_("  -D%s dump data as INSERT commands with column names\n"), D_LONG);
+ 	printf(_("  -o%s include OIDs in dump\n"), o_LONG);
+ 	printf(_("  -O%s do not output \\connect commands in plain\n"
+ 			 "    %s text format\n"), O_LONG, SPACES);
+ 	printf(_("  -R%s disable ALL reconnections to the database in\n"
+ 			 "    %s plain text format\n"), R_LONG, SPACES);
+ 	printf(_("  -s%s dump only the schema, no data\n"), s_LONG);
+ 	printf(_("  -S%s specify the superuser user name to use in\n"
+ 			 "    %s plain text format\n"), S_LONG, SPACES);
+ 	printf(_("  -t%s dump this table only (* for all)\n"), t_LONG);
+ 	printf(_("  -x%s do not dump privileges (grant/revoke)\n"), x_LONG);
+ 	printf(_("  -X%s \n"
+ 			 "    %s output SET SESSION AUTHORIZATION commands rather\n"
+ 			 "    %s than \\connect commands\n"), X1_LONG, SPACES, SPACES);
+ 	printf(_("  -X%s \n"
+ 			 "    %s disable triggers during data-only restore\n"), X2_LONG, SPACES);
+ 
+ 	/* Connection Options */
+ 
  	printf(_("\nConnection options:\n"));
+ 
  #ifdef HAVE_GETOPT_LONG
! 
! 	char* h_LONG = _(", --host=HOSTNAME     ");
! 	char* p_LONG = _(", --port=PORT         ");
! 	char* U_LONG = _(", --username=NAME     ");
! 	char* W_LONG = _(", --password          ");
! 
  #else /* not HAVE_GETOPT_LONG */
! 
! 	char* h_LONG = _(" HOSTNAME             ");
! 	char* p_LONG = _(" PORT                 ");
! 	char* U_LONG = _(" NAME                 ");
! 	char* W_LONG = SPACES;
! 
  #endif /* not HAVE_GETOPT_LONG */
  
+ 	printf(_("  -h%s database server host name\n"), h_LONG);
+ 	printf(_("  -p%s database server port number\n"), p_LONG);
+ 	printf(_("  -U%s connect as specified database user\n"), U_LONG);
+ 	printf(_("  -W%s force password prompt (should happen automatically)\n"), W_LONG);
+ 
  	printf(_("\nIf no database name is not supplied, then the PGDATABASE environment\n"
  			 "variable value is used.\n\n"));
  	printf(_("Report bugs to <pgsql-bugs@postgresql.org>.\n"));
  }
  
+ /*
+  * exit_nicely: graceful exit in case of error
+  */
  void
  exit_nicely(void)
  {
***************
*** 3267,3273 ****
  		appendPQExpBuffer(q, "\n\tCONSTRAINT %s CHECK %s",
  						  fmtId(conname), consrc);
  	}
! 	
  	appendPQExpBuffer(q, ";\n");
  
  	(*deps)[depIdx++] = NULL;	/* End of List */
--- 3320,3326 ----
  		appendPQExpBuffer(q, "\n\tCONSTRAINT %s CHECK %s",
  						  fmtId(conname), consrc);
  	}
! 
  	appendPQExpBuffer(q, ";\n");
  
  	(*deps)[depIdx++] = NULL;	/* End of List */
