1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

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 <m.polyakova@postgrespro.ru>
Reviewed-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Discussion: https://www.postgresql.org/message-id/6dd6db0984d86a51b7255ba79f111971@postgrespro.ru
This commit is contained in:
Peter Eisentraut
2022-09-16 09:37:54 +02:00
parent cf2c7a736e
commit c7db01e325
5 changed files with 57 additions and 4 deletions

View File

@ -209,8 +209,9 @@ PostgreSQL documentation
<para>
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
<literal>SQL_ASCII</literal> 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 <literal>UTF8</literal> if the
ICU locale provider is used. The character sets supported by
the <productname>PostgreSQL</productname> server are described
in <xref linkend="multibyte-charset-supported"/>.
</para>