ALTER TEXT SEARCH CONFIGURATION <refpurpose>change the definition of a text search configuration</refpurpose> — テキスト検索設定の定義を変更する
ALTER TEXT SEARCH CONFIGURATIONnameADD MAPPING FORtoken_type[, ... ] WITHdictionary_name[, ... ] ALTER TEXT SEARCH CONFIGURATIONnameALTER MAPPING FORtoken_type[, ... ] WITHdictionary_name[, ... ] ALTER TEXT SEARCH CONFIGURATIONnameALTER MAPPING REPLACEold_dictionaryWITHnew_dictionaryALTER TEXT SEARCH CONFIGURATIONnameALTER MAPPING FORtoken_type[, ... ] REPLACEold_dictionaryWITHnew_dictionaryALTER TEXT SEARCH CONFIGURATIONnameDROP MAPPING [ IF EXISTS ] FORtoken_type[, ... ] ALTER TEXT SEARCH CONFIGURATIONnameRENAME TOnew_nameALTER TEXT SEARCH CONFIGURATIONnameOWNER TO {new_owner| CURRENT_ROLE | CURRENT_USER | SESSION_USER } ALTER TEXT SEARCH CONFIGURATIONnameSET SCHEMAnew_schema
<command>ALTER TEXT SEARCH CONFIGURATION</command> changes the definition of
a text search configuration. You can modify
its mappings from token types to dictionaries,
or change the configuration's name or owner.
ALTER TEXT SEARCH CONFIGURATIONはテキスト検索設定の定義を変更します。
トークン型から辞書への対応付けの変更、または、設定名称の変更、設定の所有者の変更を行うことができます。
You must be the owner of the configuration to use
<command>ALTER TEXT SEARCH CONFIGURATION</command>.
ALTER TEXT SEARCH CONFIGURATIONを使用するためには、設定の所有者でなければなりません。
nameThe name (optionally schema-qualified) of an existing text search configuration. 既存のテキスト検索設定の名称(スキーマ修飾可)です。
token_typeThe name of a token type that is emitted by the configuration's parser. 設定のパーサが発行するトークン型の名称です。
dictionary_nameThe name of a text search dictionary to be consulted for the specified token type(s). If multiple dictionaries are listed, they are consulted in the specified order. 指定したトークン型(複数可)で考慮されるテキスト検索辞書の名称です。 複数の辞書が列挙された場合、指定された順序で参照されます。
old_dictionaryThe name of a text search dictionary to be replaced in the mapping. 対応付けにて置換されるテキスト検索辞書の名称です。
new_dictionary
The name of a text search dictionary to be substituted for
<replaceable class="parameter">old_dictionary</replaceable>.
old_dictionaryを置き換えるテキスト検索辞書の名称です。
new_nameThe new name of the text search configuration. テキスト検索設定の新しい名称です。
new_ownerThe new owner of the text search configuration. テキスト検索設定の新しい所有者です。
new_schemaThe new schema for the text search configuration. テキスト検索設定の新しいスキーマです。
The <literal>ADD MAPPING FOR</literal> form installs a list of dictionaries to be
consulted for the specified token type(s); it is an error if there is
already a mapping for any of the token types.
The <literal>ALTER MAPPING FOR</literal> form does the same, but first removing
any existing mapping for those token types.
The <literal>ALTER MAPPING REPLACE</literal> forms substitute <replaceable
class="parameter">new_dictionary</replaceable> for <replaceable
class="parameter">old_dictionary</replaceable> anywhere the latter appears.
This is done for only the specified token types when <literal>FOR</literal>
appears, or for all mappings of the configuration when it doesn't.
The <literal>DROP MAPPING</literal> form removes all dictionaries for the
specified token type(s), causing tokens of those types to be ignored
by the text search configuration. It is an error if there is no mapping
for the token types, unless <literal>IF EXISTS</literal> appears.
ADD MAPPING FOR構文は指定したトークン型で参照される辞書のリストをインストールします。
既にそのトークン型に対する対応付けが存在する場合はエラーになります。
ALTER MAPPING FOR構文は、まず既存の対象トークン型に対する対応付けを削除する点を除き、同一です。
ALTER MAPPING REPLACE構文は、すべてのold_dictionaryをnew_dictionaryで置き換えます。
FORがあれば、これは指定したトークン型に対してのみ行われ、なければ、設定におけるすべての対応付けに対して行われます。
DROP MAPPING構文は指定したトークン型(複数可)に対するすべての辞書を削除します。
この結果、このテキスト検索設定ではこれらの型のトークンが無視されるようになります。
IF EXISTSがない限り、トークン型に対する対応付けが存在しない場合はエラーになります。
The following example replaces the <literal>english</literal> dictionary
with the <literal>swedish</literal> dictionary anywhere that <literal>english</literal>
is used within <literal>my_config</literal>.
次の例は、my_config内でenglishが使用されるすべてに対し、english辞書をswedish辞書で置換します。
ALTER TEXT SEARCH CONFIGURATION my_config ALTER MAPPING REPLACE english WITH swedish;
There is no <command>ALTER TEXT SEARCH CONFIGURATION</command> statement in
the SQL standard.
標準SQLにはALTER TEXT SEARCH CONFIGURATION文はありません。