pgsql: Improve reporting of newlocale() failures in CREATE COLLATION.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Improve reporting of newlocale() failures in CREATE COLLATION.
Дата
Msg-id E1R643p-00022j-5N@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Improve reporting of newlocale() failures in CREATE COLLATION.

The standardized errno code for "no such locale" failures is ENOENT, which
we were just reporting at face value, viz "No such file or directory".
Per gripe from Thom Brown, this might confuse users, so add an errdetail
message to clarify what it means.  Also, report newlocale() failures as
ERRCODE_INVALID_PARAMETER_VALUE rather than using
errcode_for_file_access(), since newlocale()'s errno values aren't
necessarily tied directly to file access failures.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/37d4fd2b9d331076292201ab988fe54f09640850

Modified Files
--------------
src/backend/utils/adt/pg_locale.c |   39 +++++++++++++++++++++++-------------
1 files changed, 25 insertions(+), 14 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix another Assert issue exposed by CLOBBER_CACHE_ALWAYS.
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Improve reporting of newlocale() failures in CREATE COLLATION.