1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-19 17:02:53 +03:00

Turn the -i/--ignore-version options of pg_dump and pg_dumpall into no-ops:

the server version check is now always enforced.  Relax the version check to
allow a server that is of pg_dump's own major version but a later minor
version; this is the only case that -i was at all safe to use in.

pg_restore already enforced only a very weak version check, so this is
really just a documentation change for it.

Per discussion.
This commit is contained in:
Tom Lane
2008-04-13 03:49:22 +00:00
parent ba1c463096
commit c22ed3d523
9 changed files with 46 additions and 82 deletions

View File

@@ -1,5 +1,5 @@
<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.101 2008/03/26 16:34:47 tgl Exp $
$PostgreSQL: pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.102 2008/04/13 03:49:21 tgl Exp $
PostgreSQL documentation
-->
@@ -296,20 +296,7 @@ PostgreSQL documentation
<term><option>--ignore-version</></term>
<listitem>
<para>
Ignore version mismatch between
<application>pg_dump</application> and the database server.
</para>
<para>
By default, <application>pg_dump</> will refuse to attempt
to dump from a server that is of a newer <productname>PostgreSQL</>
version than <application>pg_dump</application> is. It will also
refuse to attempt to dump from a server that is older than the oldest
supported version (currently, 7.0). The <option>-i</> option
overrides this check and forces a dump to be attempted anyway.
This option is <emphasis>deprecated</> because the dump is very
likely to fail &mdash; or worse, seem to succeed but be wrong or
incomplete.
A deprecated option that is now ignored.
</para>
</listitem>
</varlistentry>

View File

@@ -1,5 +1,5 @@
<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.71 2008/03/26 16:34:47 tgl Exp $
$PostgreSQL: pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.72 2008/04/13 03:49:21 tgl Exp $
PostgreSQL documentation
-->
@@ -156,20 +156,7 @@ PostgreSQL documentation
<term><option>--ignore-version</></term>
<listitem>
<para>
Ignore version mismatch between
<application>pg_dumpall</application> and the database server.
</para>
<para>
By default, <application>pg_dumpall</> will refuse to attempt
to dump from a server that is of a newer <productname>PostgreSQL</>
version than <application>pg_dumpall</application> is. It will also
refuse to attempt to dump from a server that is older than the oldest
supported version (currently, 7.0). The <option>-i</> option
overrides this check and forces a dump to be attempted anyway.
This option is <emphasis>deprecated</> because the dump is very
likely to fail &mdash; or worse, seem to succeed but be wrong or
incomplete.
A deprecated option that is now ignored.
</para>
</listitem>
</varlistentry>

View File

@@ -1,4 +1,4 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.74 2008/03/26 16:34:47 tgl Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.75 2008/04/13 03:49:21 tgl Exp $ -->
<refentry id="APP-PGRESTORE">
<refmeta>
@@ -200,8 +200,7 @@
<term><option>--ignore-version</option></term>
<listitem>
<para>
Ignore version mismatch between
<application>pg_restore</application> and the database server.
A deprecated option that is now ignored.
</para>
</listitem>
</varlistentry>