Don't allow creation of database with ICU locale with unsupported encoding
authorPeter Eisentraut <[email protected]>
Fri, 16 Sep 2022 07:37:54 +0000 (09:37 +0200)
committerPeter Eisentraut <[email protected]>
Fri, 16 Sep 2022 07:41:33 +0000 (09:41 +0200)
commitc7db01e325a530ec38ec7ba57cd3ed32e123e33c
tree699109735a34071a016940152cb6ab5e7960e74f
parentcf2c7a736e4939ff0d6cf2acd29b17eea3bca7c2
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 <[email protected]>
Reviewed-by: Kyotaro Horiguchi <[email protected]>
Discussion: https://www.postgresql.org/message-id/6dd6db0984d86a51b7255ba79f111971@postgrespro.ru
doc/src/sgml/ref/initdb.sgml
src/backend/commands/dbcommands.c
src/bin/initdb/initdb.c
src/bin/initdb/t/001_initdb.pl
src/bin/scripts/t/020_createdb.pl