1CREATE TEXT SEARCH TEMPLATPEo(s7t)greSQL 15.4 DocumentCaRtEiAoTnE TEXT 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 for further information.
33
35 name
36 The name of the text search template to be created. The name can be
37 schema-qualified.
38
39 init_function
40 The name of the init function for the template.
41
42 lexize_function
43 The name of the lexize function for the template.
44
45 The function names can be schema-qualified if necessary. Argument types
46 are not given, since the argument list for each type of function is
47 predetermined. The lexize function is required, but the init function
48 is optional.
49
50 The arguments can appear in any order, not only the one shown above.
51
53 There is no CREATE TEXT SEARCH TEMPLATE statement in the SQL standard.
54
56 ALTER TEXT SEARCH TEMPLATE (ALTER_TEXT_SEARCH_TEMPLATE(7)), DROP TEXT
57 SEARCH TEMPLATE (DROP_TEXT_SEARCH_TEMPLATE(7))
58
59
60
61PostgreSQL 15.4 2023 CREATE TEXT SEARCH TEMPLATE(7)