From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Improve reporting of newlocale() failures in CREATE COLLATION. |
Date: | 2011-09-20 17:24:45 |
Message-ID: | E1R643p-00022l-5U@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
------
REL9_1_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/226bc87c2da98ebd9ac08d1677961cb5e7ea4e5a
Modified Files
--------------
src/backend/utils/adt/pg_locale.c | 39 +++++++++++++++++++++++-------------
1 files changed, 25 insertions(+), 14 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2011-09-20 21:47:58 | pgsql: Suppress "unused function" warning when not HAVE_LOCALE_T. |
Previous Message | Tom Lane | 2011-09-19 03:46:19 | pgsql: Fix another Assert issue exposed by CLOBBER_CACHE_ALWAYS. |