pg_dump -i wording - Mailing list pgsql-patches
From | Bruce Momjian |
---|---|
Subject | pg_dump -i wording |
Date | |
Msg-id | 200803230110.m2N1AM306382@momjian.us Whole thread Raw |
Responses |
Re: pg_dump -i wording
|
List | pgsql-patches |
Simon Riggs wrote: > On Thu, 2008-01-31 at 11:20 -0300, Alvaro Herrera wrote: > > > Tom Lane wrote: > > > > > > in fact, personally I'd like to make that case be a hard error, > > > > rather than something people could override with -i. > > > > +1 to this idea. TODO for 8.4? > > -1 without some more planning about the effects and implications. I have developed the attached patch with improves wording for the pg_dump -i (ignore version) option. The previous wording just said "proceed" which was very neutral. The new wording says "skip", which is more active and more likely for people to understand it isn't something to do lightly. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://postgres.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + Index: doc/src/sgml/ref/pg_dump.sgml =================================================================== RCS file: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v retrieving revision 1.98 diff -c -c -r1.98 pg_dump.sgml *** doc/src/sgml/ref/pg_dump.sgml 11 Dec 2007 19:57:32 -0000 1.98 --- doc/src/sgml/ref/pg_dump.sgml 23 Mar 2008 01:07:46 -0000 *************** *** 296,303 **** <term><option>--ignore-version</></term> <listitem> <para> ! Ignore version mismatch between ! <application>pg_dump</application> and the database server. </para> <para> --- 296,302 ---- <term><option>--ignore-version</></term> <listitem> <para> ! Skip server version checks </para> <para> Index: src/bin/pg_dump/pg_backup_db.c =================================================================== RCS file: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_db.c,v retrieving revision 1.77 diff -c -c -r1.77 pg_backup_db.c *** src/bin/pg_dump/pg_backup_db.c 9 Dec 2007 19:01:40 -0000 1.77 --- src/bin/pg_dump/pg_backup_db.c 23 Mar 2008 01:07:46 -0000 *************** *** 72,80 **** write_msg(NULL, "server version: %s; %s version: %s\n", remoteversion_str, progname, PG_VERSION); if (ignoreVersion) ! write_msg(NULL, "proceeding despite version mismatch\n"); else ! die_horribly(AH, NULL, "aborting because of version mismatch (Use the -i option to proceed anyway.)\n"); } } --- 72,80 ---- write_msg(NULL, "server version: %s; %s version: %s\n", remoteversion_str, progname, PG_VERSION); if (ignoreVersion) ! write_msg(NULL, "skipping server version checks\n"); else ! die_horribly(AH, NULL, "aborting because of version mismatch\nUse the -i option to skip server version checks.\n"); } } Index: src/bin/pg_dump/pg_dump.c =================================================================== RCS file: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v retrieving revision 1.482 diff -c -c -r1.482 pg_dump.c *** src/bin/pg_dump/pg_dump.c 30 Jan 2008 18:35:55 -0000 1.482 --- src/bin/pg_dump/pg_dump.c 23 Mar 2008 01:07:46 -0000 *************** *** 740,747 **** printf(_("\nGeneral options:\n")); 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")); printf(_(" --help show this help, then exit\n")); --- 740,746 ---- printf(_("\nGeneral options:\n")); 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 skip server version checks\n")); printf(_(" -v, --verbose verbose mode\n")); printf(_(" -Z, --compress=0-9 compression level for compressed formats\n")); printf(_(" --help show this help, then exit\n")); Index: src/bin/pg_dump/pg_dumpall.c =================================================================== RCS file: /cvsroot/pgsql/src/bin/pg_dump/pg_dumpall.c,v retrieving revision 1.100 diff -c -c -r1.100 pg_dumpall.c *** src/bin/pg_dump/pg_dumpall.c 1 Jan 2008 19:45:55 -0000 1.100 --- src/bin/pg_dump/pg_dumpall.c 23 Mar 2008 01:07:46 -0000 *************** *** 482,489 **** printf(_("\nGeneral options:\n")); printf(_(" -f, --file=FILENAME output file name\n")); ! printf(_(" -i, --ignore-version proceed even when server version mismatches\n" ! " pg_dumpall version\n")); printf(_(" --help show this help, then exit\n")); printf(_(" --version output version information, then exit\n")); printf(_("\nOptions controlling the output content:\n")); --- 482,488 ---- printf(_("\nGeneral options:\n")); printf(_(" -f, --file=FILENAME output file name\n")); ! printf(_(" -i, --ignore-version skip server version checks\n")); printf(_(" --help show this help, then exit\n")); printf(_(" --version output version information, then exit\n")); printf(_("\nOptions controlling the output content:\n")); *************** *** 1392,1401 **** fprintf(stderr, _("server version: %s; %s version: %s\n"), remoteversion_str, progname, PG_VERSION); if (ignoreVersion) ! fprintf(stderr, _("proceeding despite version mismatch\n")); else { ! fprintf(stderr, _("aborting because of version mismatch (Use the -i option to proceed anyway.)\n")); exit(1); } } --- 1391,1400 ---- fprintf(stderr, _("server version: %s; %s version: %s\n"), remoteversion_str, progname, PG_VERSION); if (ignoreVersion) ! fprintf(stderr, _("skipping server version checks\n")); else { ! fprintf(stderr, _("aborting because of version mismatch\nUse the -i option to skip server version checks.\n")); exit(1); } } Index: src/bin/pg_dump/pg_restore.c =================================================================== RCS file: /cvsroot/pgsql/src/bin/pg_dump/pg_restore.c,v retrieving revision 1.85 diff -c -c -r1.85 pg_restore.c *** src/bin/pg_dump/pg_restore.c 11 Dec 2007 19:01:06 -0000 1.85 --- src/bin/pg_dump/pg_restore.c 23 Mar 2008 01:07:46 -0000 *************** *** 371,377 **** printf(_(" -d, --dbname=NAME connect to database name\n")); printf(_(" -f, --file=FILENAME output file name\n")); printf(_(" -F, --format=c|t specify backup file format\n")); ! printf(_(" -i, --ignore-version proceed even when server version mismatches\n")); printf(_(" -l, --list print summarized TOC of the archive\n")); printf(_(" -v, --verbose verbose mode\n")); printf(_(" --help show this help, then exit\n")); --- 371,377 ---- printf(_(" -d, --dbname=NAME connect to database name\n")); printf(_(" -f, --file=FILENAME output file name\n")); printf(_(" -F, --format=c|t specify backup file format\n")); ! printf(_(" -i, --ignore-version skip server version checks\n")); printf(_(" -l, --list print summarized TOC of the archive\n")); printf(_(" -v, --verbose verbose mode\n")); printf(_(" --help show this help, then exit\n"));
pgsql-patches by date: