[prev in list] [next in list] [prev in thread] [next in thread]
List: pgsql-patches
Subject: Re: [PATCHES] pg_dump -i wording
From: Bruce Momjian <bruce () momjian ! us>
Date: 2008-03-26 14:33:45
Message-ID: 200803261433.m2QEXjr19797 () momjian ! us
[Download RAW message or body]
Bruce Momjian wrote:
> Tom Lane wrote:
> > Bruce Momjian <bruce@momjian.us> writes:
> > > I have developed the attached patch with improves wording for the
> > > pg_dump -i (ignore version) option.
> >
> > I think this is going in exactly the wrong direction --- it makes
> > both the documentation and the warning message less scary not more
> > so.
>
> OK, updated pg_dump -i wording, more scary.
Updated patch applied, with improved wording when the -i option is
specified.
--
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. +
["/rtmp/diff" (/rtmp/diff)]
Index: doc/src/sgml/ref/pg_dump.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v
retrieving revision 1.99
diff -c -c -r1.99 pg_dump.sgml
*** doc/src/sgml/ref/pg_dump.sgml 20 Mar 2008 17:36:57 -0000 1.99
--- doc/src/sgml/ref/pg_dump.sgml 26 Mar 2008 14:26:54 -0000
***************
*** 296,314 ****
<term><option>--ignore-version</></term>
<listitem>
<para>
! Ignore version mismatch between
<application>pg_dump</application> and the database server.
</para>
<para>
- <application>pg_dump</application> can dump from servers running
- previous releases of <productname>PostgreSQL</>, but very old
- versions are not supported anymore (currently, those prior to 7.0).
Dumping from a server newer than <application>pg_dump</application>
! is likely not to work at all.
! Use this option if you need to override the version check (and
! if <application>pg_dump</application> then fails, don't say
! you weren't warned).
</para>
</listitem>
</varlistentry>
--- 296,313 ----
<term><option>--ignore-version</></term>
<listitem>
<para>
! Ignore incompatible version check between
<application>pg_dump</application> and the database server.
</para>
<para>
Dumping from a server newer than <application>pg_dump</application>
! is likely fail and is disabled by default.
! Also, while <application>pg_dump</application> can dump from servers \
running
! previous releases of <productname>PostgreSQL</>, some very old
! versions are not supported (currently, pre-7.0).
! Use this option if you need to override the version check, but
! be prepared for <application>pg_dump</application> to fail.
</para>
</listitem>
</varlistentry>
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 26 Mar 2008 14:26:54 -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,81 ----
write_msg(NULL, "server version: %s; %s version: %s\n",
remoteversion_str, progname, PG_VERSION);
if (ignoreVersion)
! write_msg(NULL, "ignoring server version mismatch\n");
else
! die_horribly(AH, NULL, "aborting because of server version mismatch\n"
! "Use the -i option to bypass server version check, but be prepared for \
failure.\n"); }
}
Index: src/bin/pg_dump/pg_dump.c
===================================================================
RCS file: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v
retrieving revision 1.483
diff -c -c -r1.483 pg_dump.c
*** src/bin/pg_dump/pg_dump.c 20 Mar 2008 17:36:57 -0000 1.483
--- src/bin/pg_dump/pg_dump.c 26 Mar 2008 14:26:54 -0000
***************
*** 745,752 ****
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"));
--- 745,751 ----
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 ignore server version mismatch\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.102
diff -c -c -r1.102 pg_dumpall.c
*** src/bin/pg_dump/pg_dumpall.c 20 Mar 2008 17:42:51 -0000 1.102
--- src/bin/pg_dump/pg_dumpall.c 26 Mar 2008 14:26:54 -0000
***************
*** 488,495 ****
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"));
--- 488,494 ----
printf(_("\nGeneral options:\n"));
printf(_(" -f, --file=FILENAME output file name\n"));
! printf(_(" -i, --ignore-version ignore server version mismatch\n"));
printf(_(" --help show this help, then exit\n"));
printf(_(" --version output version information, then exit\n"));
printf(_("\nOptions controlling the output content:\n"));
***************
*** 1399,1408 ****
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);
}
}
--- 1398,1408 ----
fprintf(stderr, _("server version: %s; %s version: %s\n"),
remoteversion_str, progname, PG_VERSION);
if (ignoreVersion)
! fprintf(stderr, _("ignoring server version mismatch\n"));
else
{
! fprintf(stderr, _("aborting because of server version mismatch\n"
! "Use the -i option to bypass server version check, but be prepared for \
failure.\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.86
diff -c -c -r1.86 pg_restore.c
*** src/bin/pg_dump/pg_restore.c 20 Mar 2008 17:36:58 -0000 1.86
--- src/bin/pg_dump/pg_restore.c 26 Mar 2008 14:26:54 -0000
***************
*** 378,384 ****
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"));
--- 378,384 ----
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 ignore server version mismatch\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"));
--
Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-patches
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic