diff options
author | Bruce Momjian <bruce@momjian.us> | 2017-03-20 21:23:56 -0400 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2017-03-20 21:23:56 -0400 |
commit | c709b113e8f5433ea2a66b2fb08d9324dd596642 (patch) | |
tree | 546987342a84f1c7b0269296540d8cda9540c03c | |
parent | aa740b59a6841d29a0ce0206e61e99ba9531eba4 (diff) | |
download | postgresql-c709b113e8f5433ea2a66b2fb08d9324dd596642.tar.gz postgresql-c709b113e8f5433ea2a66b2fb08d9324dd596642.zip |
doc: improve createdb example
The previous example could error out due to encoding mismatches; use
-T/template instead.
Reported-by: Jason O'Donnell
-rw-r--r-- | doc/src/sgml/ref/createdb.sgml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/src/sgml/ref/createdb.sgml b/doc/src/sgml/ref/createdb.sgml index c363bd4a565..9fc4c16a810 100644 --- a/doc/src/sgml/ref/createdb.sgml +++ b/doc/src/sgml/ref/createdb.sgml @@ -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> |