66 * Portions Copyright (c) 1994, Regents of the University of California
77 *
88 *
9- * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.83 2006/10/04 00:30 :05momjian Exp $
9+ * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.84 2006/10/07 20:59 :05petere Exp $
1010 *
1111 *-------------------------------------------------------------------------
1212 */
@@ -63,7 +63,6 @@ static bool skip_acls = false;
6363static bool verbose = false;
6464static bool ignoreVersion = false;
6565
66- /* flags for -X long options */
6766static int disable_dollar_quoting = 0 ;
6867static int disable_triggers = 0 ;
6968static int use_setsessauth = 0 ;
@@ -107,8 +106,7 @@ main(int argc, char *argv[])
107106{"no-acl" ,no_argument ,NULL ,'x' },
108107
109108/*
110- * the following options don't have an equivalent short option letter,
111- * but are available as '-X long-name'
109+ * the following options don't have an equivalent short option letter
112110 */
113111{"disable-dollar-quoting" ,no_argument ,& disable_dollar_quoting ,1 },
114112{"disable-triggers" ,no_argument ,& disable_triggers ,1 },
@@ -255,10 +253,11 @@ main(int argc, char *argv[])
255253break ;
256254
257255case 'X' :
256+ /* -X is a deprecated alternative to long options */
258257if (strcmp (optarg ,"disable-dollar-quoting" )== 0 )
259- appendPQExpBuffer (pgdumpopts ," -X disable-dollar-quoting" );
258+ appendPQExpBuffer (pgdumpopts ," -- disable-dollar-quoting" );
260259else if (strcmp (optarg ,"disable-triggers" )== 0 )
261- appendPQExpBuffer (pgdumpopts ," -X disable-triggers" );
260+ appendPQExpBuffer (pgdumpopts ," -- disable-triggers" );
262261else if (strcmp (optarg ,"use-set-session-authorization" )== 0 )
263262/* no-op, still allowed for compatibility */ ;
264263else
@@ -282,11 +281,11 @@ main(int argc, char *argv[])
282281
283282/* Add long options to the pg_dump argument list */
284283if (disable_dollar_quoting )
285- appendPQExpBuffer (pgdumpopts ," -X disable-dollar-quoting" );
284+ appendPQExpBuffer (pgdumpopts ," -- disable-dollar-quoting" );
286285if (disable_triggers )
287- appendPQExpBuffer (pgdumpopts ," -X disable-triggers" );
286+ appendPQExpBuffer (pgdumpopts ," -- disable-triggers" );
288287if (use_setsessauth )
289- appendPQExpBuffer (pgdumpopts ," -X use-set-session-authorization" );
288+ appendPQExpBuffer (pgdumpopts ," -- use-set-session-authorization" );
290289
291290if (optind < argc )
292291{
@@ -388,11 +387,10 @@ help(void)
388387printf (_ (" -s, --schema-only dump only the schema, no data\n" ));
389388printf (_ (" -S, --superuser=NAME specify the superuser user name to use in the dump\n" ));
390389printf (_ (" -x, --no-privileges do not dump privileges (grant/revoke)\n" ));
391- printf (_ (" -X disable-dollar-quoting, - -disable-dollar-quoting\n"
390+ printf (_ (" --disable-dollar-quoting\n"
392391" disable dollar quoting, use SQL standard quoting\n" ));
393- printf (_ (" -X disable-triggers, --disable-triggers\n"
394- " disable triggers during data-only restore\n" ));
395- printf (_ (" -X use-set-session-authorization, --use-set-session-authorization\n"
392+ printf (_ (" --disable-triggers disable triggers during data-only restore\n" ));
393+ printf (_ (" --use-set-session-authorization\n"
396394" use SESSION AUTHORIZATION commands instead of\n"
397395" OWNER TO commands\n" ));
398396