doc: improve createdb example
authorBruce Momjian <bruce@momjian.us>
Tue, 21 Mar 2017 01:23:56 +0000 (21:23 -0400)
committerBruce Momjian <bruce@momjian.us>
Tue, 21 Mar 2017 01:23:56 +0000 (21:23 -0400)
The previous example could error out due to encoding mismatches;  use
-T/template instead.

Reported-by: Jason O'Donnell
doc/src/sgml/ref/createdb.sgml

index c363bd4a5654e772dd6ab3b27f72f37a4d7b9295..9fc4c16a8104a85af1cb2b23f729e59b550140c3 100644 (file)
@@ -363,11 +363,11 @@ PostgreSQL documentation
    <para>
     To create the database <literal>demo</literal> using the
     server on host <literal>eden</>, port 5000, using the
-    <literal>LATIN1</literal> encoding scheme with a look at the
-    underlying command:
+    <literal>template0</literal> template database,  here is the
+    command-line command and the underlying SQL command:
 <screen>
-<prompt>$ </prompt><userinput>createdb -p 5000 -h eden -E LATIN1 -e demo</userinput>
-<computeroutput>CREATE DATABASE demo ENCODING 'LATIN1';</computeroutput>
+<prompt>$ </prompt><userinput>createdb -p 5000 -h eden -T template0 -e demo</userinput>
+<computeroutput>CREATE DATABASE demo TEMPLATE template0;</computeroutput>
 </screen></para>
  </refsect1>