-
Notifications
You must be signed in to change notification settings - Fork 2
/
snowball_ext_func.sql.in
32 lines (28 loc) · 1.24 KB
/
snowball_ext_func.sql.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
* Create underlying C functions for Snowball stemmers
*
* Copyright (c) 2007-2018, PostgreSQL Global Development Group
*
* contrib/snowball_ext/snowball_ext_func.sql.in
*
* This file is combined with multiple instances of snowball_ext.sql.in to
* build snowball_ext--1.0.sql.
*
* Note: this file is read in single-user -j mode, which means that the
* command terminator is semicolon-newline-newline; whenever the backend
* sees that, it stops and executes what it's got. If you write a lot of
* statements without empty lines between, they'll all get quoted to you
* in any error message about one of them, so don't do that. Also, you
* cannot write a semicolon immediately followed by an empty line in a
* string literal (including a function body!) or a multiline comment.
*/
CREATE FUNCTION dsnowball_ext_init(INTERNAL)
RETURNS INTERNAL AS 'MODULE_PATHNAME', 'dsnowball_ext_init'
LANGUAGE C STRICT;
CREATE FUNCTION dsnowball_ext_lexize(INTERNAL, INTERNAL, INTERNAL, INTERNAL)
RETURNS INTERNAL AS 'MODULE_PATHNAME', 'dsnowball_ext_lexize'
LANGUAGE C STRICT;
CREATE TEXT SEARCH TEMPLATE snowball_ext
(INIT = dsnowball_ext_init,
LEXIZE = dsnowball_ext_lexize);
COMMENT ON TEXT SEARCH TEMPLATE snowball_ext IS 'snowball stemmer';