Print the actual DB encoding in the unaccent regression test.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 18 Aug 2009 16:00:50 +0000 (16:00 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 18 Aug 2009 16:00:50 +0000 (16:00 +0000)
This is to help make it more obvious what the problem is, if the
encoding isn't what the test expects.

contrib/unaccent/expected/unaccent.out
contrib/unaccent/sql/unaccent.sql

index 8d197c50be73cb28bad9ae769a0e35b2edbb00ad..a09e00fe5b1394eeea1ea5a875968b86aabaee8b 100644 (file)
@@ -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 
index 71ab5bb43583f89c6625adfbed802b9af09ac6fa..ede938d4795bddec457b21c56c105748ba766adf 100644 (file)
@@ -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');