]> begriffs open source - ai-pg/blob - full-docs/txt/sql-altertsdictionary.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / sql-altertsdictionary.txt
1
2 ALTER TEXT SEARCH DICTIONARY
3
4    ALTER TEXT SEARCH DICTIONARY — change the definition of a text search
5    dictionary
6
7 Synopsis
8
9 ALTER TEXT SEARCH DICTIONARY name (
10     option [ = value ] [, ... ]
11 )
12 ALTER TEXT SEARCH DICTIONARY name RENAME TO new_name
13 ALTER TEXT SEARCH DICTIONARY name OWNER TO { new_owner | CURRENT_ROLE | CURRENT_
14 USER | SESSION_USER }
15 ALTER TEXT SEARCH DICTIONARY name SET SCHEMA new_schema
16
17 Description
18
19    ALTER TEXT SEARCH DICTIONARY changes the definition of a text search
20    dictionary. You can change the dictionary's template-specific options,
21    or change the dictionary's name or owner.
22
23    You must be the owner of the dictionary to use ALTER TEXT SEARCH
24    DICTIONARY.
25
26 Parameters
27
28    name
29           The name (optionally schema-qualified) of an existing text
30           search dictionary.
31
32    option
33           The name of a template-specific option to be set for this
34           dictionary.
35
36    value
37           The new value to use for a template-specific option. If the
38           equal sign and value are omitted, then any previous setting for
39           the option is removed from the dictionary, allowing the default
40           to be used.
41
42    new_name
43           The new name of the text search dictionary.
44
45    new_owner
46           The new owner of the text search dictionary.
47
48    new_schema
49           The new schema for the text search dictionary.
50
51    Template-specific options can appear in any order.
52
53 Examples
54
55    The following example command changes the stopword list for a
56    Snowball-based dictionary. Other parameters remain unchanged.
57 ALTER TEXT SEARCH DICTIONARY my_dict ( StopWords = newrussian );
58
59    The following example command changes the language option to dutch, and
60    removes the stopword option entirely.
61 ALTER TEXT SEARCH DICTIONARY my_dict ( language = dutch, StopWords );
62
63    The following example command “updates” the dictionary's definition
64    without actually changing anything.
65 ALTER TEXT SEARCH DICTIONARY my_dict ( dummy );
66
67    (The reason this works is that the option removal code doesn't complain
68    if there is no such option.) This trick is useful when changing
69    configuration files for the dictionary: the ALTER will force existing
70    database sessions to re-read the configuration files, which otherwise
71    they would never do if they had read them earlier.
72
73 Compatibility
74
75    There is no ALTER TEXT SEARCH DICTIONARY statement in the SQL standard.
76
77 See Also
78
79    CREATE TEXT SEARCH DICTIONARY, DROP TEXT SEARCH DICTIONARY