Skip to content

Commit c709b11

Browse files
committed
doc: improve createdb example
The previous example could error out due to encoding mismatches; use -T/template instead. Reported-by: Jason O'Donnell
1 parent aa740b5 commit c709b11

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/src/sgml/ref/createdb.sgml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -363,11 +363,11 @@ PostgreSQL documentation
363363
<para>
364364
To create the database <literal>demo</literal> using the
365365
server on host <literal>eden</>, port 5000, using the
366-
<literal>LATIN1</literal> encoding scheme with a look at the
367-
underlying command:
366+
<literal>template0</literal> template database, here is the
367+
command-line command and the underlying SQL command:
368368
<screen>
369-
<prompt>$ </prompt><userinput>createdb -p 5000 -h eden -E LATIN1 -e demo</userinput>
370-
<computeroutput>CREATE DATABASE demo ENCODING 'LATIN1';</computeroutput>
369+
<prompt>$ </prompt><userinput>createdb -p 5000 -h eden -T template0 -e demo</userinput>
370+
<computeroutput>CREATE DATABASE demo TEMPLATE template0;</computeroutput>
371371
</screen></para>
372372
</refsect1>
373373

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy