OSDN Git Service

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 8d197c5..a09e00f 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 71ab5bb..ede938d 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');