Skip to content

Commit 7bbe35a

Browse files
committed
Add an example showing how to cope with mixed-case names in pg_dump
switches.
1 parent 765cc15 commit 7bbe35a

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

doc/src/sgml/ref/pg_dump.sgml

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.91 2006/10/23 18:10:32 petere Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.92 2006/11/28 22:54:18 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -838,6 +838,20 @@ CREATE DATABASE foo WITH TEMPLATE template0;
838838

839839
<screen>
840840
<prompt>$</prompt> <userinput>pg_dump -T 'ts_*' mydb &gt; db.sql</userinput>
841+
</screen>
842+
</para>
843+
844+
<para>
845+
To specify an upper-case or mixed-case name in <option>-t</> and related
846+
switches, you need to double-quote the name; else it will be folded to
847+
lower case (see <xref
848+
linkend="APP-PSQL-patterns" endterm="APP-PSQL-patterns-title">). But
849+
double quotes are special to the shell, so in turn they must be quoted.
850+
Thus, to dump a single table with a mixed-case name, you need something
851+
like
852+
853+
<screen>
854+
<prompt>$</prompt> <userinput>pg_dump -t '"MixedCaseName"' mydb &gt; mytab.sql</userinput>
841855
</screen>
842856
</para>
843857

0 commit comments

Comments
 (0)