[PATCH] Add regression test for mismatched ENCODING and LOCALE in CREATE DATABASE

Поиск
Список
Период
Сортировка
Искать

[PATCH] Add regression test for mismatched ENCODING and LOCALE in CREATE DATABASE

От:
Yushu Chen <gentcys@gmail.com>
Дата:
Вложения:
Hi,

While reading the CREATE DATABASE documentation at
https://www.postgresql.org/docs/current/sql-createdatabase.html, I
noticed the following sentence:

"The specified locale and encoding settings must match, or an error
will be reported."

However, we do not currently have regression coverage for that failure case.

This patch adds a regression test covering incompatible ENCODING and
LOCALE combinations, for example:

CREATE DATABASE dbtest
    LOCALE 'en_US.UTF-8'
    ENCODING LATIN1
    TEMPLATE template0;

Which is expected to fail due to the encoding/locale mismatch.

The patch only adds test coverage and does not change backend behavior.

Regards,
Yushu
FAQ