Skip to content

Commit 960be4a

Browse files
committed
Improve documentation about pg_dump's --quote-all-identifiers switch.
Per bug #14152 from Alejandro Martínez. Back-patch to all supported branches. Discussion: <20160520165824.22598.31426@wrigleys.postgresql.org>
1 parent 16ea51a commit 960be4a

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

doc/src/sgml/ref/pg_dump.sgml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -836,9 +836,16 @@ PostgreSQL documentation
836836
<term><option>--quote-all-identifiers</></term>
837837
<listitem>
838838
<para>
839-
Force quoting of all identifiers. This may be useful when dumping a
840-
database for migration to a future version that may have introduced
841-
additional keywords.
839+
Force quoting of all identifiers. This option is recommended when
840+
dumping a database from a server whose <productname>PostgreSQL</>
841+
major version is different from <application>pg_dump</>'s, or when
842+
the output is intended to be loaded into a server of a different
843+
major version. By default, <application>pg_dump</> quotes only
844+
identifiers that are reserved words in its own major version.
845+
This sometimes results in compatibility issues when dealing with
846+
servers of other versions that may have slightly different sets
847+
of reserved words. Using <option>--quote-all-identifiers</> prevents
848+
such issues, at the price of a harder-to-read dump script.
842849
</para>
843850
</listitem>
844851
</varlistentry>

doc/src/sgml/ref/pg_dumpall.sgml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,9 +368,16 @@ PostgreSQL documentation
368368
<term><option>--quote-all-identifiers</></term>
369369
<listitem>
370370
<para>
371-
Force quoting of all identifiers. This may be useful when dumping a
372-
database for migration to a future version that may have introduced
373-
additional keywords.
371+
Force quoting of all identifiers. This option is recommended when
372+
dumping a database from a server whose <productname>PostgreSQL</>
373+
major version is different from <application>pg_dumpall</>'s, or when
374+
the output is intended to be loaded into a server of a different
375+
major version. By default, <application>pg_dumpall</> quotes only
376+
identifiers that are reserved words in its own major version.
377+
This sometimes results in compatibility issues when dealing with
378+
servers of other versions that may have slightly different sets
379+
of reserved words. Using <option>--quote-all-identifiers</> prevents
380+
such issues, at the price of a harder-to-read dump script.
374381
</para>
375382
</listitem>
376383
</varlistentry>

0 commit comments

Comments
 (0)