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

Commit98f3c1a

Browse files
author
Artur Zakirov
committed
Tests was corrected.
Fixed bugs with the functions shared_ispell_reset(), shared_ispell_dicts(), shared_ispell_stoplists()
1 parent66124aa commit98f3c1a

File tree

7 files changed

+453
-20
lines changed

7 files changed

+453
-20
lines changed

‎contrib/shared_ispell/expected/shared_ispell.out‎

Lines changed: 69 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
11
CREATE EXTENSION shared_ispell;
2+
SELECT shared_ispell_mem_available();
3+
shared_ispell_mem_available
4+
-----------------------------
5+
1048528
6+
(1 row)
7+
8+
SELECT shared_ispell_mem_used();
9+
shared_ispell_mem_used
10+
------------------------
11+
48
12+
(1 row)
13+
214
-- Test ISpell dictionary with ispell affix file
315
CREATE TEXT SEARCH DICTIONARY shared_ispell (
416
Template=shared_ispell,
517
DictFile=ispell_sample,
6-
AffFile=ispell_sample
18+
AffFile=ispell_sample,
19+
Stopwords=english
720
);
821
SELECT ts_lexize('shared_ispell', 'skies');
922
ts_lexize
@@ -95,6 +108,18 @@ SELECT ts_lexize('shared_ispell', 'footballyklubber');
95108
{foot,ball,klubber}
96109
(1 row)
97110

111+
SELECT shared_ispell_mem_available();
112+
shared_ispell_mem_available
113+
-----------------------------
114+
980312
115+
(1 row)
116+
117+
SELECT shared_ispell_mem_used();
118+
shared_ispell_mem_used
119+
------------------------
120+
68264
121+
(1 row)
122+
98123
-- Test ISpell dictionary with hunspell affix file
99124
CREATE TEXT SEARCH DICTIONARY shared_hunspell (
100125
Template=shared_ispell,
@@ -191,3 +216,46 @@ SELECT ts_lexize('shared_hunspell', 'footballyklubber');
191216
{foot,ball,klubber}
192217
(1 row)
193218

219+
SELECT shared_ispell_mem_available();
220+
shared_ispell_mem_available
221+
-----------------------------
222+
914208
223+
(1 row)
224+
225+
SELECT shared_ispell_mem_used();
226+
shared_ispell_mem_used
227+
------------------------
228+
134368
229+
(1 row)
230+
231+
SELECT * FROM shared_ispell_dicts();
232+
dict_name | affix_name | words | affixes | bytes
233+
---------------+-----------------+-------+---------+-------
234+
ispell_sample | hunspell_sample | 8 | 0 | 66104
235+
ispell_sample | ispell_sample | 8 | 0 | 66104
236+
(2 rows)
237+
238+
SELECT * FROM shared_ispell_stoplists();
239+
stop_name | words | bytes
240+
-----------+-------+-------
241+
english | 127 | 2112
242+
(1 row)
243+
244+
SELECT shared_ispell_reset();
245+
shared_ispell_reset
246+
---------------------
247+
248+
(1 row)
249+
250+
SELECT shared_ispell_mem_available();
251+
shared_ispell_mem_available
252+
-----------------------------
253+
1048528
254+
(1 row)
255+
256+
SELECT shared_ispell_mem_used();
257+
shared_ispell_mem_used
258+
------------------------
259+
48
260+
(1 row)
261+
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
Running in noclean mode. Mistakes will not be cleaned up.
2+
The files belonging to this database system will be owned by user "artur".
3+
This user must also own the server process.
4+
5+
The database cluster will be initialized with locales
6+
COLLATE: ru_RU.UTF-8
7+
CTYPE: ru_RU.UTF-8
8+
MESSAGES: C
9+
MONETARY: ru_RU.UTF-8
10+
NUMERIC: ru_RU.UTF-8
11+
TIME: ru_RU.UTF-8
12+
The default database encoding has accordingly been set to "UTF8".
13+
The default text search configuration will be set to "russian".
14+
15+
Data page checksums are disabled.
16+
17+
creating directory /home/artur/source/pg/postgrespro/contrib/shared_ispell/./tmp_check/data ... ok
18+
creating subdirectories ... ok
19+
selecting default max_connections ... 100
20+
selecting default shared_buffers ... 128MB
21+
selecting dynamic shared memory implementation ... posix
22+
creating configuration files ... ok
23+
creating template1 database in /home/artur/source/pg/postgrespro/contrib/shared_ispell/./tmp_check/data/base/1 ... ok
24+
initializing pg_authid ... ok
25+
initializing dependencies ... ok
26+
creating system views ... ok
27+
loading system objects' descriptions ... ok
28+
creating collations ... ok
29+
creating conversions ... ok
30+
creating dictionaries ... ok
31+
setting privileges on built-in objects ... ok
32+
creating information schema ... ok
33+
loading PL/pgSQL server-side language ... ok
34+
vacuuming database template1 ... ok
35+
copying template1 to template0 ... ok
36+
copying template1 to postgres ... ok
37+
38+
Sync to disk skipped.
39+
The data directory might become corrupt if the operating system crashes.
40+
41+
WARNING: enabling "trust" authentication for local connections
42+
You can change this by editing pg_hba.conf or using the option -A, or
43+
--auth-local and --auth-host, the next time you run initdb.
44+
45+
Success. You can now start the database server using:
46+
47+
pg_ctl -D /home/artur/source/pg/postgrespro/contrib/shared_ispell/./tmp_check/data -l logfile start
48+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FATAL: the database system is starting up
2+
LOG: database system was shut down at 2016-02-12 18:34:58 MSK
3+
LOG: MultiXact member wraparound protections are now enabled
4+
LOG: database system is ready to accept connections
5+
LOG: autovacuum launcher started
6+
LOG: checkpoint starting: immediate force wait flush-all
7+
LOG: checkpoint complete: wrote 3 buffers (0.0%); 0 transaction log file(s) added, 0 removed, 0 recycled; write=0.001 s, sync=0.000 s, total=0.001 s; sync files=0, longest=0.000 s, average=0.000 s; distance=1 kB, estimate=1 kB
8+
LOG: checkpoint starting: immediate force wait
9+
LOG: checkpoint complete: wrote 0 buffers (0.0%); 0 transaction log file(s) added, 0 removed, 0 recycled; write=0.000 s, sync=0.000 s, total=0.000 s; sync files=0, longest=0.000 s, average=0.000 s; distance=0 kB, estimate=1 kB
10+
LOG: received fast shutdown request
11+
LOG: aborting any active transactions
12+
LOG: autovacuum launcher shutting down
13+
LOG: shutting down
14+
LOG: checkpoint starting: shutdown immediate
15+
LOG: checkpoint complete: wrote 39 buffers (0.2%); 0 transaction log file(s) added, 0 removed, 0 recycled; write=0.000 s, sync=0.000 s, total=0.000 s; sync files=0, longest=0.000 s, average=0.000 s; distance=118 kB, estimate=118 kB
16+
LOG: database system is shut down
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
shared_preload_libraries='shared_ispell'
1+
shared_preload_libraries = 'shared_ispell'
2+
shared_ispell.max_size = 1MB

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp