]> begriffs open source - ai-pg/blob - full-docs/txt/sql-altertsconfig.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / sql-altertsconfig.txt
1
2 ALTER TEXT SEARCH CONFIGURATION
3
4    ALTER TEXT SEARCH CONFIGURATION — change the definition of a text
5    search configuration
6
7 Synopsis
8
9 ALTER TEXT SEARCH CONFIGURATION name
10     ADD MAPPING FOR token_type [, ... ] WITH dictionary_name [, ... ]
11 ALTER TEXT SEARCH CONFIGURATION name
12     ALTER MAPPING FOR token_type [, ... ] WITH dictionary_name [, ... ]
13 ALTER TEXT SEARCH CONFIGURATION name
14     ALTER MAPPING REPLACE old_dictionary WITH new_dictionary
15 ALTER TEXT SEARCH CONFIGURATION name
16     ALTER MAPPING FOR token_type [, ... ] REPLACE old_dictionary WITH new_dictio
17 nary
18 ALTER TEXT SEARCH CONFIGURATION name
19     DROP MAPPING [ IF EXISTS ] FOR token_type [, ... ]
20 ALTER TEXT SEARCH CONFIGURATION name RENAME TO new_name
21 ALTER TEXT SEARCH CONFIGURATION name OWNER TO { new_owner | CURRENT_ROLE | CURRE
22 NT_USER | SESSION_USER }
23 ALTER TEXT SEARCH CONFIGURATION name SET SCHEMA new_schema
24
25 Description
26
27    ALTER TEXT SEARCH CONFIGURATION changes the definition of a text search
28    configuration. You can modify its mappings from token types to
29    dictionaries, or change the configuration's name or owner.
30
31    You must be the owner of the configuration to use ALTER TEXT SEARCH
32    CONFIGURATION.
33
34 Parameters
35
36    name
37           The name (optionally schema-qualified) of an existing text
38           search configuration.
39
40    token_type
41           The name of a token type that is emitted by the configuration's
42           parser.
43
44    dictionary_name
45           The name of a text search dictionary to be consulted for the
46           specified token type(s). If multiple dictionaries are listed,
47           they are consulted in the specified order.
48
49    old_dictionary
50           The name of a text search dictionary to be replaced in the
51           mapping.
52
53    new_dictionary
54           The name of a text search dictionary to be substituted for
55           old_dictionary.
56
57    new_name
58           The new name of the text search configuration.
59
60    new_owner
61           The new owner of the text search configuration.
62
63    new_schema
64           The new schema for the text search configuration.
65
66    The ADD MAPPING FOR form installs a list of dictionaries to be
67    consulted for the specified token type(s); it is an error if there is
68    already a mapping for any of the token types. The ALTER MAPPING FOR
69    form does the same, but first removing any existing mapping for those
70    token types. The ALTER MAPPING REPLACE forms substitute new_dictionary
71    for old_dictionary anywhere the latter appears. This is done for only
72    the specified token types when FOR appears, or for all mappings of the
73    configuration when it doesn't. The DROP MAPPING form removes all
74    dictionaries for the specified token type(s), causing tokens of those
75    types to be ignored by the text search configuration. It is an error if
76    there is no mapping for the token types, unless IF EXISTS appears.
77
78 Examples
79
80    The following example replaces the english dictionary with the swedish
81    dictionary anywhere that english is used within my_config.
82 ALTER TEXT SEARCH CONFIGURATION my_config
83   ALTER MAPPING REPLACE english WITH swedish;
84
85 Compatibility
86
87    There is no ALTER TEXT SEARCH CONFIGURATION statement in the SQL
88    standard.
89
90 See Also
91
92    CREATE TEXT SEARCH CONFIGURATION, DROP TEXT SEARCH CONFIGURATION