Skip to content

Commit 02b3890

Browse files
author
Aleksandr Parfenov
committed
Add a FTS Config test to unaccent contrib
1 parent 427fe8d commit 02b3890

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

contrib/unaccent/expected/unaccent.out

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,14 @@ SELECT ts_lexize('unaccent', '
6161
{����}
6262
(1 row)
6363

64+
CREATE TEXT SEARCH CONFIGURATION unaccent(
65+
COPY=russian
66+
);
67+
ALTER TEXT SEARCH CONFIGURATION unaccent ALTER MAPPING FOR
68+
asciiword, word WITH unaccent MAP russian_stem;
69+
SELECT to_tsvector('unaccent', 'foobar ����� ����');
70+
to_tsvector
71+
------------------------------
72+
'foobar':1 '�����':2 '���':3
73+
(1 row)
74+

contrib/unaccent/sql/unaccent.sql

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ CREATE EXTENSION unaccent;
22

33
-- must have a UTF8 database
44
SELECT getdatabaseencoding();
5-
65
SET client_encoding TO 'KOI8';
76

87
SELECT unaccent('foobar');
@@ -16,3 +15,12 @@ SELECT unaccent('unaccent', '
1615
SELECT ts_lexize('unaccent', 'foobar');
1716
SELECT ts_lexize('unaccent', '£ÌËÁ');
1817
SELECT ts_lexize('unaccent', '³öéë');
18+
19+
CREATE TEXT SEARCH CONFIGURATION unaccent(
20+
COPY=russian
21+
);
22+
23+
ALTER TEXT SEARCH CONFIGURATION unaccent ALTER MAPPING FOR
24+
asciiword, word WITH unaccent MAP russian_stem;
25+
26+
SELECT to_tsvector('unaccent', 'foobar ³öéëé £ÌËÉ');

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy