From: Bruce Momjian Date: Tue, 21 Mar 2017 01:23:56 +0000 (-0400) Subject: doc: improve createdb example X-Git-Tag: REL_10_BETA1~581 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c709b113e8f5433ea2a66b2fb08d9324dd596642;p=thirdparty%2Fpostgresql.git doc: improve createdb example The previous example could error out due to encoding mismatches; use -T/template instead. Reported-by: Jason O'Donnell --- 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 To create the database demo using the server on host eden, port 5000, using the - LATIN1 encoding scheme with a look at the - underlying command: + template0 template database, here is the + command-line command and the underlying SQL command: -$ createdb -p 5000 -h eden -E LATIN1 -e demo -CREATE DATABASE demo ENCODING 'LATIN1'; +$ createdb -p 5000 -h eden -T template0 -e demo +CREATE DATABASE demo TEMPLATE template0;