Skip to content

Commit f2727f5

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 405b9ba commit f2727f5

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
@@ -792,9 +792,16 @@ PostgreSQL documentation
792792
<term><option>--quote-all-identifiers</></term>
793793
<listitem>
794794
<para>
795-
Force quoting of all identifiers. This may be useful when dumping a
796-
database for migration to a future version that may have introduced
797-
additional keywords.
795+
Force quoting of all identifiers. This option is recommended when
796+
dumping a database from a server whose <productname>PostgreSQL</>
797+
major version is different from <application>pg_dump</>'s, or when
798+
the output is intended to be loaded into a server of a different
799+
major version. By default, <application>pg_dump</> quotes only
800+
identifiers that are reserved words in its own major version.
801+
This sometimes results in compatibility issues when dealing with
802+
servers of other versions that may have slightly different sets
803+
of reserved words. Using <option>--quote-all-identifiers</> prevents
804+
such issues, at the price of a harder-to-read dump script.
798805
</para>
799806
</listitem>
800807
</varlistentry>

doc/src/sgml/ref/pg_dumpall.sgml

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

0 commit comments

Comments
 (0)