summary refs log tree commit diff
path: root/docs
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-04-29 11:50:18 +0100
committerErik Johnston <erik@matrix.org>2015-04-29 11:50:33 +0100
commit72443572bf5dd147f50b0168e1078d88476a3e9f (patch)
treeb254af7cfd42fbf839e4ecbb1c479805837c60a9 /docs
parentDelete ugly commented out log line. (diff)
downloadsynapse-72443572bf5dd147f50b0168e1078d88476a3e9f.tar.xz
Mention that postgres databases must have the correct charset encoding
Diffstat (limited to 'docs')
-rw-r--r--docs/postgres.rst17
1 files changed, 17 insertions, 0 deletions
diff --git a/docs/postgres.rst b/docs/postgres.rst
index a04ab12b1a..d645e1d697 100644
--- a/docs/postgres.rst
+++ b/docs/postgres.rst
@@ -1,6 +1,23 @@
 Using Postgres
 --------------
 
+Set up database
+===============
+
+The PostgreSQL database used *must* have the correct encoding set, otherwise
+would not be able to store UTF8 strings. To create a database with the correct
+encoding use, e.g.::
+
+ CREATE DATABASE synapse
+  ENCODING 'UTF8'
+  LC_COLLATE='C'
+  LC_CTYPE='C'
+  template=template0
+  OWNER synapse_user;
+
+This would create an appropriate database named ``synapse`` owned by the
+``synapse_user`` user (which must already exist).
+
 Set up client
 =============