mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Fix t_isspace(), etc., when datlocprovider=i and datctype=C.
Check whether the datctype is C to determine whether t_isspace() and related functions use isspace() or iswspace(). Previously, t_isspace() checked whether the database default collation was C; which is incorrect when the default collation uses the ICU provider. Discussion: https://postgr.es/m/79e4354d9eccfdb00483146a6b9f6295202e7890.camel@j-davis.com Reviewed-by: Peter Eisentraut Backpatch-through: 15
This commit is contained in:
@ -1,12 +1,3 @@
|
||||
-- unaccent is broken if the default collation is provided by ICU and
|
||||
-- LC_CTYPE=C
|
||||
SELECT current_setting('lc_ctype') = 'C' AND
|
||||
(SELECT datlocprovider='i' FROM pg_database
|
||||
WHERE datname=current_database())
|
||||
AS skip_test \gset
|
||||
\if :skip_test
|
||||
\quit
|
||||
\endif
|
||||
CREATE EXTENSION unaccent;
|
||||
-- must have a UTF8 database
|
||||
SELECT getdatabaseencoding();
|
||||
|
@ -1,8 +0,0 @@
|
||||
-- unaccent is broken if the default collation is provided by ICU and
|
||||
-- LC_CTYPE=C
|
||||
SELECT current_setting('lc_ctype') = 'C' AND
|
||||
(SELECT datlocprovider='i' FROM pg_database
|
||||
WHERE datname=current_database())
|
||||
AS skip_test \gset
|
||||
\if :skip_test
|
||||
\quit
|
Reference in New Issue
Block a user