Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit92e05bc

Browse files
committed
Unaccent dictionary.
1 parenta88a480 commit92e05bc

File tree

12 files changed

+808
-3
lines changed

12 files changed

+808
-3
lines changed

‎contrib/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $PostgreSQL: pgsql/contrib/Makefile,v 1.88 2009/08/07 20:50:21 petere Exp $
1+
# $PostgreSQL: pgsql/contrib/Makefile,v 1.89 2009/08/18 10:34:39 teodor Exp $
22

33
subdir = contrib
44
top_builddir = ..
@@ -39,6 +39,7 @@ SUBDIRS = \
3939
tablefunc\
4040
test_parser\
4141
tsearch2\
42+
unaccent\
4243
vacuumlo
4344

4445
ifeq ($(with_openssl),yes)

‎contrib/README

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,10 @@ tsearch2 -
169169
Pavel Stehule <pavel.stehule@gmail.com>, based on code originally by
170170
Teodor Sigaev <teodor@sigaev.ru> and Oleg Bartunov <oleg@sai.msu.su>.
171171

172+
unaccent -
173+
Unaccent dictionary for text search
174+
Teodor Sigaev <teodor@sigaev.ru> and Oleg Bartunov <oleg@sai.msu.su>.
175+
172176
uuid-ossp -
173177
UUID generation functions
174178
by Peter Eisentraut <peter_e@gmx.net>

‎contrib/unaccent/Makefile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# $PostgreSQL: pgsql/contrib/unaccent/Makefile,v 1.1 2009/08/18 10:34:39 teodor Exp $
2+
3+
MODULE_big = unaccent
4+
OBJS = unaccent.o
5+
6+
DATA_built = unaccent.sql
7+
DATA = uninstall_unaccent.sql
8+
DATA_TSEARCH = unaccent.rules
9+
REGRESS = unaccent
10+
11+
12+
ifdefUSE_PGXS
13+
PG_CONFIG = pg_config
14+
PGXS :=$(shell$(PG_CONFIG) --pgxs)
15+
include$(PGXS)
16+
else
17+
subdir = contrib/pg_trgm
18+
top_builddir = ../..
19+
include$(top_builddir)/src/Makefile.global
20+
include$(top_srcdir)/contrib/contrib-global.mk
21+
endif
22+
23+
#redefine REGRESS_OPTS because of needings of UTF8 database
24+
REGRESS_OPTS = --dbname=$(CONTRIB_TESTDB) --multibyte=UTF8 --no-locale
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
SET client_min_messages = warning;
2+
\set ECHO none
3+
RESET client_min_messages;
4+
SET client_encoding TO 'KOI8';
5+
SELECT unaccent('foobar');
6+
unaccent
7+
----------
8+
foobar
9+
(1 row)
10+
11+
SELECT unaccent('����');
12+
unaccent
13+
----------
14+
����
15+
(1 row)
16+
17+
SELECT unaccent('����');
18+
unaccent
19+
----------
20+
����
21+
(1 row)
22+
23+
SELECT unaccent('unaccent', 'foobar');
24+
unaccent
25+
----------
26+
foobar
27+
(1 row)
28+
29+
SELECT unaccent('unaccent', '����');
30+
unaccent
31+
----------
32+
����
33+
(1 row)
34+
35+
SELECT unaccent('unaccent', '����');
36+
unaccent
37+
----------
38+
����
39+
(1 row)
40+
41+
SELECT ts_lexize('unaccent', 'foobar');
42+
ts_lexize
43+
-----------
44+
45+
(1 row)
46+
47+
SELECT ts_lexize('unaccent', '����');
48+
ts_lexize
49+
-----------
50+
{����}
51+
(1 row)
52+
53+
SELECT ts_lexize('unaccent', '����');
54+
ts_lexize
55+
-----------
56+
{����}
57+
(1 row)
58+

‎contrib/unaccent/sql/unaccent.sql

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
SET client_min_messages= warning;
2+
\set ECHO none
3+
\iunaccent.sql
4+
\set ECHO all
5+
RESET client_min_messages;
6+
7+
SET client_encoding TO'KOI8';
8+
9+
SELECT unaccent('foobar');
10+
SELECT unaccent('L肆');
11+
SELECT unaccent('出殡');
12+
13+
SELECT unaccent('unaccent','foobar');
14+
SELECT unaccent('unaccent','L肆');
15+
SELECT unaccent('unaccent','出殡');
16+
17+
SELECT ts_lexize('unaccent','foobar');
18+
SELECT ts_lexize('unaccent','L肆');
19+
SELECT ts_lexize('unaccent','出殡');

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp