From 1abd146dddc1dc5efff5ccac065c460108acbaa9 Mon Sep 17 00:00:00 2001
From: Tom Lane <tgl@sss.pgh.pa.us>
Date: Sat, 23 Apr 2011 12:51:47 -0400
Subject: [PATCH] Adjust comments about collate.linux.utf8 regression test.

This test should now work in any database with UTF8 encoding, regardless
of the database's default locale.  The former restriction was really
"doesn't work if default locale is C", and that was because of not handling
mbstowcs/wcstombs correctly.
---
 doc/src/sgml/regress.sgml                        | 2 +-
 src/test/regress/expected/collate.linux.utf8.out | 3 ++-
 src/test/regress/sql/collate.linux.utf8.sql      | 3 ++-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/doc/src/sgml/regress.sgml b/doc/src/sgml/regress.sgml
index bb5f577852c..60250bb7a9f 100644
--- a/doc/src/sgml/regress.sgml
+++ b/doc/src/sgml/regress.sgml
@@ -254,7 +254,7 @@ gmake check EXTRA_TESTS=numeric_big
 gmake check EXTRA_TESTS=collate.linux.utf8 LANG=en_US.utf8
 </screen>
     The <literal>collate.linux.utf8</> test works only on Linux/glibc
-    platforms, and only when run in a locale that uses UTF-8 encoding.
+    platforms, and only when run in a database that uses UTF-8 encoding.
    </para>
   </sect2>
   </sect1>
diff --git a/src/test/regress/expected/collate.linux.utf8.out b/src/test/regress/expected/collate.linux.utf8.out
index 9813b6847c8..c065ae98ebb 100644
--- a/src/test/regress/expected/collate.linux.utf8.out
+++ b/src/test/regress/expected/collate.linux.utf8.out
@@ -1,6 +1,7 @@
 /*
  * This test is for Linux/glibc systems and assumes that a full set of
- * locales is installed.  It must be run in a UTF-8 locale.
+ * locales is installed.  It must be run in a database with UTF-8 encoding,
+ * because other encodings don't support all the characters used.
  */
 SET client_encoding TO UTF8;
 CREATE TABLE collate_test1 (
diff --git a/src/test/regress/sql/collate.linux.utf8.sql b/src/test/regress/sql/collate.linux.utf8.sql
index dfb10e4d15b..e16d96a3316 100644
--- a/src/test/regress/sql/collate.linux.utf8.sql
+++ b/src/test/regress/sql/collate.linux.utf8.sql
@@ -1,6 +1,7 @@
 /*
  * This test is for Linux/glibc systems and assumes that a full set of
- * locales is installed.  It must be run in a UTF-8 locale.
+ * locales is installed.  It must be run in a database with UTF-8 encoding,
+ * because other encodings don't support all the characters used.
  */
 
 SET client_encoding TO UTF8;
-- 
GitLab