1CREATE TEXT SEARCH TEMPLAPToEs(t7g)reSQL 9.2.24 DocumenCtRaEtAiToEnTEXT SEARCH TEMPLATE(7)
2
3
4
6 CREATE_TEXT_SEARCH_TEMPLATE - define a new text search template
7
9 CREATE TEXT SEARCH TEMPLATE name (
10 [ INIT = init_function , ]
11 LEXIZE = lexize_function
12 )
13
15 CREATE TEXT SEARCH TEMPLATE creates a new text search template. Text
16 search templates define the functions that implement text search
17 dictionaries. A template is not useful by itself, but must be
18 instantiated as a dictionary to be used. The dictionary typically
19 specifies parameters to be given to the template functions.
20
21 If a schema name is given then the text search template is created in
22 the specified schema. Otherwise it is created in the current schema.
23
24 You must be a superuser to use CREATE TEXT SEARCH TEMPLATE. This
25 restriction is made because an erroneous text search template
26 definition could confuse or even crash the server. The reason for
27 separating templates from dictionaries is that a template encapsulates
28 the “unsafe” aspects of defining a dictionary. The parameters that can
29 be set when defining a dictionary are safe for unprivileged users to
30 set, and so creating a dictionary need not be a privileged operation.
31
32 Refer to Chapter 12, Full Text Search, in the documentation for further
33 information.
34
36 name
37 The name of the text search template to be created. The name can be
38 schema-qualified.
39
40 init_function
41 The name of the init function for the template.
42
43 lexize_function
44 The name of the lexize function for the template.
45
46 The function names can be schema-qualified if necessary. Argument types
47 are not given, since the argument list for each type of function is
48 predetermined. The lexize function is required, but the init function
49 is optional.
50
51 The arguments can appear in any order, not only the one shown above.
52
54 There is no CREATE TEXT SEARCH TEMPLATE statement in the SQL standard.
55
57 ALTER TEXT SEARCH TEMPLATE (ALTER_TEXT_SEARCH_TEMPLATE(7)), DROP TEXT
58 SEARCH TEMPLATE (DROP_TEXT_SEARCH_TEMPLATE(7))
59
60
61
62PostgreSQL 9.2.24 2017-11-06 CREATE TEXT SEARCH TEMPLATE(7)