summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorJeff Davis <jdavis@postgresql.org>2023-03-17 11:47:35 -0700
committerJeff Davis <jdavis@postgresql.org>2023-03-17 12:08:46 -0700
commitf413941f41d370a7893caa3e6ed384b89a0577fd (patch)
tree05a69d2b5ddd453939f3a5346c525fc51ec304ba /contrib
parent064709f803c05559d2849a62fdb855fbb91ffeb8 (diff)
downloadpostgresql-f413941f41d370a7893caa3e6ed384b89a0577fd.tar.gz
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
Diffstat (limited to 'contrib')
-rw-r--r--contrib/unaccent/expected/unaccent.out9
-rw-r--r--contrib/unaccent/expected/unaccent_1.out8
-rw-r--r--contrib/unaccent/sql/unaccent.sql11
3 files changed, 0 insertions, 28 deletions
diff --git a/contrib/unaccent/expected/unaccent.out b/contrib/unaccent/expected/unaccent.out
index cef98ee60c..ee0ac71a1c 100644
--- a/contrib/unaccent/expected/unaccent.out
+++ b/contrib/unaccent/expected/unaccent.out
@@ -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();
diff --git a/contrib/unaccent/expected/unaccent_1.out b/contrib/unaccent/expected/unaccent_1.out
deleted file mode 100644
index 0a4a3838ab..0000000000
--- a/contrib/unaccent/expected/unaccent_1.out
+++ /dev/null
@@ -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
diff --git a/contrib/unaccent/sql/unaccent.sql b/contrib/unaccent/sql/unaccent.sql
index 027dfb964a..3fc0c706be 100644
--- a/contrib/unaccent/sql/unaccent.sql
+++ b/contrib/unaccent/sql/unaccent.sql
@@ -1,14 +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