summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2009-08-18 16:00:50 +0000
committerTom Lane2009-08-18 16:00:50 +0000
commit4e6c44f923426213141cc07a17d16dd1fbea443e (patch)
tree6d2416ff81f5c1b44a9d140cfaec54c64c5717db
parent326325593c133d4bbde6431581acc6221798539e (diff)
Print the actual DB encoding in the unaccent regression test.
This is to help make it more obvious what the problem is, if the encoding isn't what the test expects.
-rw-r--r--contrib/unaccent/expected/unaccent.out7
-rw-r--r--contrib/unaccent/sql/unaccent.sql3
2 files changed, 10 insertions, 0 deletions
diff --git a/contrib/unaccent/expected/unaccent.out b/contrib/unaccent/expected/unaccent.out
index 8d197c50be..a09e00fe5b 100644
--- a/contrib/unaccent/expected/unaccent.out
+++ b/contrib/unaccent/expected/unaccent.out
@@ -1,6 +1,13 @@
SET client_min_messages = warning;
\set ECHO none
RESET client_min_messages;
+-- must have a UTF8 database
+SELECT getdatabaseencoding();
+ getdatabaseencoding
+---------------------
+ UTF8
+(1 row)
+
SET client_encoding TO 'KOI8';
SELECT unaccent('foobar');
unaccent
diff --git a/contrib/unaccent/sql/unaccent.sql b/contrib/unaccent/sql/unaccent.sql
index 71ab5bb435..ede938d479 100644
--- a/contrib/unaccent/sql/unaccent.sql
+++ b/contrib/unaccent/sql/unaccent.sql
@@ -4,6 +4,9 @@ SET client_min_messages = warning;
\set ECHO all
RESET client_min_messages;
+-- must have a UTF8 database
+SELECT getdatabaseencoding();
+
SET client_encoding TO 'KOI8';
SELECT unaccent('foobar');