Skip to content

Commit 6081a71

Browse files
committed
Use UTF8 database for tests
1 parent a13fdc4 commit 6081a71

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

Diff for: Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ DATA = pg_tsparser--1.0.sql
88
PGFILEDESC = "pg_tsparser - parser for text search"
99

1010
REGRESS = pg_tsparser
11+
# We need a UTF8 database
12+
ENCODING = UTF8
13+
NO_LOCALE = 1
1114

1215
ifdef USE_PGXS
1316
PG_CONFIG = pg_config

Diff for: expected/pg_tsparser.out

+8
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,14 @@ SELECT to_tsvector('english_ts', 'test2.com');
237237
(1 row)
238238

239239
-- Test non-ASCII symbols
240+
-- must have a UTF8 database
241+
SELECT getdatabaseencoding();
242+
getdatabaseencoding
243+
---------------------
244+
UTF8
245+
(1 row)
246+
247+
SET client_encoding TO 'UTF8';
240248
SELECT * from ts_parse('tsparser', 'аб_вгд 12_абв 12-абв абв.рф абв2.рф');
241249
tokid | token
242250
-------+--------

Diff for: sql/pg_tsparser.sql

+5
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,9 @@ SELECT to_tsvector('english_ts', 'test.com');
2828
SELECT to_tsvector('english_ts', 'test2.com');
2929

3030
-- Test non-ASCII symbols
31+
32+
-- must have a UTF8 database
33+
SELECT getdatabaseencoding();
34+
SET client_encoding TO 'UTF8';
35+
3136
SELECT * from ts_parse('tsparser', 'аб_вгд 12_абв 12-абв абв.рф абв2.рф');

0 commit comments

Comments
 (0)