From c7db01e325a530ec38ec7ba57cd3ed32e123e33c Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Fri, 16 Sep 2022 09:37:54 +0200 Subject: Don't allow creation of database with ICU locale with unsupported encoding Check in CREATE DATABASE and initdb that the selected encoding is supported by ICU. Before, they would pass but users would later get an error from the server when they tried to use the database. Also document that initdb sets the encoding to UTF8 by default if the ICU locale provider is chosen. Author: Marina Polyakova Reviewed-by: Kyotaro Horiguchi Discussion: https://www.postgresql.org/message-id/6dd6db0984d86a51b7255ba79f111971@postgrespro.ru --- doc/src/sgml/ref/initdb.sgml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/ref/initdb.sgml b/doc/src/sgml/ref/initdb.sgml index f01df2dde96..81588962980 100644 --- a/doc/src/sgml/ref/initdb.sgml +++ b/doc/src/sgml/ref/initdb.sgml @@ -209,8 +209,9 @@ PostgreSQL documentation Selects the encoding of the template databases. This will also be the default encoding of any database you create later, - unless you override it then. The default is derived from the locale, or - SQL_ASCII if that does not work. The character sets supported by + unless you override it then. The default is derived from the locale, + if the libc locale provider is used, or UTF8 if the + ICU locale provider is used. The character sets supported by the PostgreSQL server are described in . -- cgit v1.2.3