]> begriffs open source - ai-pg/blob - full-docs/txt/sql-createtstemplate.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / sql-createtstemplate.txt
1
2 CREATE TEXT SEARCH TEMPLATE
3
4    CREATE TEXT SEARCH TEMPLATE — define a new text search template
5
6 Synopsis
7
8 CREATE TEXT SEARCH TEMPLATE name (
9     [ INIT = init_function , ]
10     LEXIZE = lexize_function
11 )
12
13 Description
14
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
34 Parameters
35
36    name
37           The name of the text search template to be created. The name can
38           be 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
53 Compatibility
54
55    There is no CREATE TEXT SEARCH TEMPLATE statement in the SQL standard.
56
57 See Also
58
59    ALTER TEXT SEARCH TEMPLATE, DROP TEXT SEARCH TEMPLATE