{"Entry":{"collection":"sql","key":"alter-text-search-dictionary","name":"ALTER TEXT SEARCH DICTIONARY","aliases":["altertsdictionary"],"metadata":{"aliases":["altertsdictionary"],"changed_in":["9.0","9.1","9.5","14"],"changes":[{"from":"8.2","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":[],"removed":[]},"status":"added","synopsis":null,"to":"8.3"},{"from":"8.4","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["parameters"],"removed":[]},"status":"changed","synopsis":{"added":["ALTER TEXT SEARCH DICTIONARY name RENAME TO new_name","ALTER TEXT SEARCH DICTIONARY name OWNER TO new_owner"],"removed":["ALTER TEXT SEARCH DICTIONARY name RENAME TO newname","ALTER TEXT SEARCH DICTIONARY name OWNER TO newowner"]},"to":"9.0"},{"from":"9.0","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["parameters"],"removed":[]},"status":"changed","synopsis":{"added":["ALTER TEXT SEARCH DICTIONARY name SET SCHEMA new_schema"],"removed":[]},"to":"9.1"},{"from":"9.4","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":[],"removed":[]},"status":"changed","synopsis":{"added":["ALTER TEXT SEARCH DICTIONARY name OWNER TO { new_owner | CURRENT_USER | SESSION_USER }"],"removed":[]},"to":"9.5"},{"from":"9.6","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":["examples"],"removed":[]},"status":"changed","synopsis":null,"to":"10"},{"from":"13","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":[],"removed":[]},"status":"changed","synopsis":{"added":["ALTER TEXT SEARCH DICTIONARY name OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }"],"removed":[]},"to":"14"}],"content_hash":"7988436cd42cd05d381a19a714ee526e121b32a5600fa4b910a040fa0d72ddb3","derived_content_hash":"7aee3a0f8570650d9e7da4105cb8887c1876277cc2e999c94ca9461f2f912314","editorial":{},"first_version":"8.3","group":"textsearch","imported_at":"2026-09-30T17:43:38.599313+08:00","last_version":"20","name":"ALTER TEXT SEARCH DICTIONARY","object":"TEXT SEARCH DICTIONARY","position":8004,"present_in":["8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"purpose":"change the definition of a text search dictionary","purpose_zh":"","related":["create-text-search-dictionary","drop-text-search-dictionary"],"repair_provenance":{"original_source_revision":"wiki-repair-20261023:2adf15306d76263a7d1653b00e205011c69280c59d87e9f49d61f2d65d6bb34a","receipt_sha256":"bf8565eadb8002499e3f8cdbf2c006cfd077a545d05a17c939c6acf408d82343","repair":"wiki-repair-20261023"},"slug":"alter-text-search-dictionary","source_rev":"wiki-repair-20261023:22c89bcc54777f2fb33f666be527fd9aa660437938fcec784be7d11cb2f09fc4","synopsis":"ALTER TEXT SEARCH DICTIONARY name (\noption [ = value ] [, ... ]\n)\nALTER TEXT SEARCH DICTIONARY name RENAME TO new_name\nALTER TEXT SEARCH DICTIONARY name OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }\nALTER TEXT SEARCH DICTIONARY name SET SCHEMA new_schema","verb":"ALTER"}},"Definition":{"Collection":"sql","Key":"alter-text-search-dictionary","SourceDatabase":"center","Version":"18","SourceTable":"sqlcmd","SourceKey":"alter-text-search-dictionary","SourceRevision":"wiki-repair-20261023:22c89bcc54777f2fb33f666be527fd9aa660437938fcec784be7d11cb2f09fc4","Facts":{"anchor":"SQL-ALTERTSDICTIONARY","description_zh":"更改一个文本检索词典的定义","description_zh_html":"\u003cpre\u003eALTER TEXT SEARCH DICTIONARY name (\noption [ = value ] [, ... ]\n)\nALTER TEXT SEARCH DICTIONARY name RENAME TO new_name\nALTER TEXT SEARCH DICTIONARY name OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }\nALTER TEXT SEARCH DICTIONARY name SET SCHEMA new_schema\u003c/pre\u003e\u003csection\u003e\u003ch2\u003e描述\u003c/h2\u003e\u003cp\u003e\n\u003ccode class=\"command\"\u003eALTER TEXT SEARCH DICTIONARY\u003c/code\u003e 更改文本检索词典的定义。你可以更改该词典的模板相关选项，也可以更改该词典的名称或拥有者。\n  \u003c/p\u003e\u003cp\u003e\n   要使用 \u003ccode class=\"command\"\u003eALTER TEXT SEARCH DICTIONARY\u003c/code\u003e，你必须是该词典的拥有者。\n  \u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e参数\u003c/h2\u003e\u003cdiv class=\"variablelist\"\u003e\u003cdl class=\"variablelist\"\u003e\u003cdt id=\"ZH18-AUTO-ALTER_TSDICTIONARY-VARLISTENTRY-1\"\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n      一个现有文本检索词典的名称（可以是模式限定的）。\n     \u003c/p\u003e\u003c/dd\u003e\u003cdt id=\"ZH18-AUTO-ALTER_TSDICTIONARY-VARLISTENTRY-2\"\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n      要为此词典设置的模板相关选项的名称。\n     \u003c/p\u003e\u003c/dd\u003e\u003cdt id=\"ZH18-AUTO-ALTER_TSDICTIONARY-VARLISTENTRY-3\"\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n      模板相关选项要使用的新值。如果省略等号和值，则会从该词典中移除该选项之前的设置，从而允许使用默认值。\n     \u003c/p\u003e\u003c/dd\u003e\u003cdt id=\"ZH18-AUTO-ALTER_TSDICTIONARY-VARLISTENTRY-4\"\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_name\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n      该文本检索词典的新名称。\n     \u003c/p\u003e\u003c/dd\u003e\u003cdt id=\"ZH18-AUTO-ALTER_TSDICTIONARY-VARLISTENTRY-5\"\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_owner\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n      该文本检索词典的新拥有者。\n     \u003c/p\u003e\u003c/dd\u003e\u003cdt id=\"ZH18-AUTO-ALTER_TSDICTIONARY-VARLISTENTRY-6\"\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_schema\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n      该文本检索词典的新模式。\n     \u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e\u003cp\u003e\n   模板相关选项可以以任意顺序出现。\n  \u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e示例\u003c/h2\u003e\u003cp\u003e\n   下面的示例命令更改了一个基于 Snowball 的词典的停用词列表。其他参数保持不变。\n  \u003c/p\u003e\u003cpre class=\"programlisting\"\u003e\nALTER TEXT SEARCH DICTIONARY my_dict ( StopWords = newrussian );\n\u003c/pre\u003e\u003cp\u003e\n   下面的示例命令将语言选项更改为 \u003ccode class=\"literal\"\u003edutch\u003c/code\u003e，并完全移除了停用词选项。\n  \u003c/p\u003e\u003cpre class=\"programlisting\"\u003e\nALTER TEXT SEARCH DICTIONARY my_dict ( language = dutch, StopWords );\n\u003c/pre\u003e\u003cp\u003e\n   下面的示例命令\u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003e更新\u003c/span\u003e”\u003c/span\u003e了该词典的定义，但实际上并没有做任何更改。\n\n\u003c/p\u003e\u003cpre class=\"programlisting\"\u003e\nALTER TEXT SEARCH DICTIONARY my_dict ( dummy );\n\u003c/pre\u003e\u003cp\u003e\n\n   （之所以可行，是因为选项移除代码在不存在该选项时也不会报错。）这种技巧在修改该词典的配置文件时很有用：\u003ccode class=\"command\"\u003eALTER\u003c/code\u003e\n   会强制现有数据库会话重新读取配置文件，而如果它们先前已经读取过这些文件，本来是不会再次读取的。\n  \u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e兼容性\u003c/h2\u003e\u003cp\u003e\n   在 SQL 标准中没有\n   \u003ccode class=\"command\"\u003eALTER TEXT SEARCH DICTIONARY\u003c/code\u003e 语句。\n  \u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e另见\u003c/h2\u003e\u003cspan class=\"simplelist\"\u003e\u003ca class=\"xref\" href=\"/zh/docs/18/sql-createtsdictionary.html\" title=\"CREATE TEXT SEARCH DICTIONARY\"\u003e\u003cspan class=\"refentrytitle\"\u003eCREATE TEXT SEARCH DICTIONARY\u003c/span\u003e\u003c/a\u003e, \u003ca class=\"xref\" href=\"/zh/docs/18/sql-droptsdictionary.html\" title=\"DROP TEXT SEARCH DICTIONARY\"\u003e\u003cspan class=\"refentrytitle\"\u003eDROP TEXT SEARCH DICTIONARY\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e\u003c/section\u003e","file":"sql-altertsdictionary.html","lang":"en","name":"ALTER TEXT SEARCH DICTIONARY","purpose":"change the definition of a text search dictionary","purpose_zh":"更改一个文本检索词典的定义","related":["create-text-search-dictionary","drop-text-search-dictionary"],"sections":[{"html":"\u003cp\u003e\u003ccode class=\"command\"\u003eALTER TEXT SEARCH DICTIONARY\u003c/code\u003e changes the definition of a text search dictionary. You can change the dictionary's template-specific options, or change the dictionary's name or owner.\u003c/p\u003e\u003cp\u003eYou must be the owner of the dictionary to use \u003ccode class=\"command\"\u003eALTER TEXT SEARCH DICTIONARY\u003c/code\u003e.\u003c/p\u003e","key":"description","title":"Description"},{"html":"\u003cdiv class=\"variablelist\"\u003e\u003cdl class=\"variablelist\"\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe name (optionally schema-qualified) of an existing text search dictionary.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe name of a template-specific option to be set for this dictionary.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe new value to use for a template-specific option. If the equal sign and value are omitted, then any previous setting for the option is removed from the dictionary, allowing the default to be used.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_name\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe new name of the text search dictionary.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_owner\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe new owner of the text search dictionary.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_schema\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe new schema for the text search dictionary.\u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e\u003cp\u003eTemplate-specific options can appear in any order.\u003c/p\u003e","key":"parameters","title":"Parameters"},{"html":"\u003cp\u003eThe following example command changes the stopword list for a Snowball-based dictionary. Other parameters remain unchanged.\u003c/p\u003e\u003cpre class=\"programlisting\"\u003eALTER TEXT SEARCH DICTIONARY my_dict ( StopWords = newrussian );\n\u003c/pre\u003e\u003cp\u003eThe following example command changes the language option to \u003ccode class=\"literal\"\u003edutch\u003c/code\u003e, and removes the stopword option entirely.\u003c/p\u003e\u003cpre class=\"programlisting\"\u003eALTER TEXT SEARCH DICTIONARY my_dict ( language = dutch, StopWords );\n\u003c/pre\u003e\u003cp\u003eThe following example command \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003eupdates\u003c/span\u003e”\u003c/span\u003e the dictionary's definition without actually changing anything.\u003c/p\u003e\u003cpre class=\"programlisting\"\u003eALTER TEXT SEARCH DICTIONARY my_dict ( dummy );\n\u003c/pre\u003e\u003cp\u003e(The reason this works is that the option removal code doesn't complain if there is no such option.) This trick is useful when changing configuration files for the dictionary: the \u003ccode class=\"command\"\u003eALTER\u003c/code\u003e will force existing database sessions to re-read the configuration files, which otherwise they would never do if they had read them earlier.\u003c/p\u003e","key":"examples","title":"Examples"},{"html":"\u003cp\u003eThere is no \u003ccode class=\"command\"\u003eALTER TEXT SEARCH DICTIONARY\u003c/code\u003e statement in the SQL standard.\u003c/p\u003e","key":"compatibility","title":"Compatibility"},{"html":"\u003cspan class=\"simplelist\"\u003e\u003ca href=\"/wiki/sql/create-text-search-dictionary/?v=18\" title=\"CREATE TEXT SEARCH DICTIONARY\"\u003e\u003cspan class=\"refentrytitle\"\u003eCREATE TEXT SEARCH DICTIONARY\u003c/span\u003e\u003c/a\u003e, \u003ca href=\"/wiki/sql/drop-text-search-dictionary/?v=18\" title=\"DROP TEXT SEARCH DICTIONARY\"\u003e\u003cspan class=\"refentrytitle\"\u003eDROP TEXT SEARCH DICTIONARY\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e","key":"see_also","title":"See Also"}],"sections_same_as":"","slug":"18","synopsis_html":"ALTER TEXT SEARCH DICTIONARY \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e (\n    \u003cem class=\"replaceable\"\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e [ = \u003cem class=\"replaceable\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e ] [, ... ]\n)\nALTER TEXT SEARCH DICTIONARY \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e RENAME TO \u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_name\u003c/code\u003e\u003c/em\u003e\nALTER TEXT SEARCH DICTIONARY \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e OWNER TO { \u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_owner\u003c/code\u003e\u003c/em\u003e | CURRENT_ROLE | CURRENT_USER | SESSION_USER }\nALTER TEXT SEARCH DICTIONARY \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e SET SCHEMA \u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_schema\u003c/code\u003e\u003c/em\u003e","synopsis_text":"ALTER TEXT SEARCH DICTIONARY name (\noption [ = value ] [, ... ]\n)\nALTER TEXT SEARCH DICTIONARY name RENAME TO new_name\nALTER TEXT SEARCH DICTIONARY name OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }\nALTER TEXT SEARCH DICTIONARY name SET SCHEMA new_schema","translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/sql-altertsdictionary.html","sha256":"078b8a6fea41e0201fb11276e863cc9ec820517349d33d0da10c795d866896cd"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-pgdoc"},"ManualEvidence":{},"MeasuredEvidence":{}},"Text":{"Collection":"sql","Key":"alter-text-search-dictionary","SourceDatabase":"center","Version":"18","Locale":"en","Title":"ALTER TEXT SEARCH DICTIONARY","Summary":"change the definition of a text search dictionary","BodyHTML":"\u003cpre\u003eALTER TEXT SEARCH DICTIONARY name (\noption [ = value ] [, ... ]\n)\nALTER TEXT SEARCH DICTIONARY name RENAME TO new_name\nALTER TEXT SEARCH DICTIONARY name OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }\nALTER TEXT SEARCH DICTIONARY name SET SCHEMA new_schema\u003c/pre\u003e\u003csection\u003e\u003ch2\u003eDescription\u003c/h2\u003e\u003cp\u003e\u003ccode\u003eALTER TEXT SEARCH DICTIONARY\u003c/code\u003e changes the definition of a text search dictionary. You can change the dictionary\u0026#39;s template-specific options, or change the dictionary\u0026#39;s name or owner.\u003c/p\u003e\u003cp\u003eYou must be the owner of the dictionary to use \u003ccode\u003eALTER TEXT SEARCH DICTIONARY\u003c/code\u003e.\u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003eParameters\u003c/h2\u003e\u003cdiv\u003e\u003cdl\u003e\u003cdt\u003e\u003cspan\u003e\u003cem\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe name (optionally schema-qualified) of an existing text search dictionary.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan\u003e\u003cem\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe name of a template-specific option to be set for this dictionary.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan\u003e\u003cem\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe new value to use for a template-specific option. If the equal sign and value are omitted, then any previous setting for the option is removed from the dictionary, allowing the default to be used.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan\u003e\u003cem\u003e\u003ccode\u003enew_name\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe new name of the text search dictionary.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan\u003e\u003cem\u003e\u003ccode\u003enew_owner\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe new owner of the text search dictionary.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan\u003e\u003cem\u003e\u003ccode\u003enew_schema\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe new schema for the text search dictionary.\u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e\u003cp\u003eTemplate-specific options can appear in any order.\u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003eExamples\u003c/h2\u003e\u003cp\u003eThe following example command changes the stopword list for a Snowball-based dictionary. Other parameters remain unchanged.\u003c/p\u003e\u003cpre\u003eALTER TEXT SEARCH DICTIONARY my_dict ( StopWords = newrussian );\n\u003c/pre\u003e\u003cp\u003eThe following example command changes the language option to \u003ccode\u003edutch\u003c/code\u003e, and removes the stopword option entirely.\u003c/p\u003e\u003cpre\u003eALTER TEXT SEARCH DICTIONARY my_dict ( language = dutch, StopWords );\n\u003c/pre\u003e\u003cp\u003eThe following example command \u003cspan\u003e“\u003cspan\u003eupdates\u003c/span\u003e”\u003c/span\u003e the dictionary\u0026#39;s definition without actually changing anything.\u003c/p\u003e\u003cpre\u003eALTER TEXT SEARCH DICTIONARY my_dict ( dummy );\n\u003c/pre\u003e\u003cp\u003e(The reason this works is that the option removal code doesn\u0026#39;t complain if there is no such option.) This trick is useful when changing configuration files for the dictionary: the \u003ccode\u003eALTER\u003c/code\u003e will force existing database sessions to re-read the configuration files, which otherwise they would never do if they had read them earlier.\u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003eCompatibility\u003c/h2\u003e\u003cp\u003eThere is no \u003ccode\u003eALTER TEXT SEARCH DICTIONARY\u003c/code\u003e statement in the SQL standard.\u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003eSee Also\u003c/h2\u003e\u003cspan\u003e\u003ca href=\"/wiki/sql/create-text-search-dictionary/?v=18\" title=\"CREATE TEXT SEARCH DICTIONARY\" rel=\"nofollow\"\u003e\u003cspan\u003eCREATE TEXT SEARCH DICTIONARY\u003c/span\u003e\u003c/a\u003e, \u003ca href=\"/wiki/sql/drop-text-search-dictionary/?v=18\" title=\"DROP TEXT SEARCH DICTIONARY\" rel=\"nofollow\"\u003e\u003cspan\u003eDROP TEXT SEARCH DICTIONARY\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e\u003c/section\u003e","SourceRevision":"wiki-repair-20261023:22c89bcc54777f2fb33f666be527fd9aa660437938fcec784be7d11cb2f09fc4","ContentHash":"c97893bb80fc79c2fd196f5bebd5d42f8c0f3672ce35364916cf8a8b0950ff20","Payload":{"related":["create-text-search-dictionary","drop-text-search-dictionary"],"sections":[{"html":"\u003cp\u003e\u003ccode class=\"command\"\u003eALTER TEXT SEARCH DICTIONARY\u003c/code\u003e changes the definition of a text search dictionary. You can change the dictionary's template-specific options, or change the dictionary's name or owner.\u003c/p\u003e\u003cp\u003eYou must be the owner of the dictionary to use \u003ccode class=\"command\"\u003eALTER TEXT SEARCH DICTIONARY\u003c/code\u003e.\u003c/p\u003e","key":"description","title":"Description"},{"html":"\u003cdiv class=\"variablelist\"\u003e\u003cdl class=\"variablelist\"\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe name (optionally schema-qualified) of an existing text search dictionary.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe name of a template-specific option to be set for this dictionary.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe new value to use for a template-specific option. If the equal sign and value are omitted, then any previous setting for the option is removed from the dictionary, allowing the default to be used.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_name\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe new name of the text search dictionary.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_owner\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe new owner of the text search dictionary.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_schema\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe new schema for the text search dictionary.\u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e\u003cp\u003eTemplate-specific options can appear in any order.\u003c/p\u003e","key":"parameters","title":"Parameters"},{"html":"\u003cp\u003eThe following example command changes the stopword list for a Snowball-based dictionary. Other parameters remain unchanged.\u003c/p\u003e\u003cpre class=\"programlisting\"\u003eALTER TEXT SEARCH DICTIONARY my_dict ( StopWords = newrussian );\n\u003c/pre\u003e\u003cp\u003eThe following example command changes the language option to \u003ccode class=\"literal\"\u003edutch\u003c/code\u003e, and removes the stopword option entirely.\u003c/p\u003e\u003cpre class=\"programlisting\"\u003eALTER TEXT SEARCH DICTIONARY my_dict ( language = dutch, StopWords );\n\u003c/pre\u003e\u003cp\u003eThe following example command \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003eupdates\u003c/span\u003e”\u003c/span\u003e the dictionary's definition without actually changing anything.\u003c/p\u003e\u003cpre class=\"programlisting\"\u003eALTER TEXT SEARCH DICTIONARY my_dict ( dummy );\n\u003c/pre\u003e\u003cp\u003e(The reason this works is that the option removal code doesn't complain if there is no such option.) This trick is useful when changing configuration files for the dictionary: the \u003ccode class=\"command\"\u003eALTER\u003c/code\u003e will force existing database sessions to re-read the configuration files, which otherwise they would never do if they had read them earlier.\u003c/p\u003e","key":"examples","title":"Examples"},{"html":"\u003cp\u003eThere is no \u003ccode class=\"command\"\u003eALTER TEXT SEARCH DICTIONARY\u003c/code\u003e statement in the SQL standard.\u003c/p\u003e","key":"compatibility","title":"Compatibility"},{"html":"\u003cspan class=\"simplelist\"\u003e\u003ca href=\"/wiki/sql/create-text-search-dictionary/?v=18\" title=\"CREATE TEXT SEARCH DICTIONARY\"\u003e\u003cspan class=\"refentrytitle\"\u003eCREATE TEXT SEARCH DICTIONARY\u003c/span\u003e\u003c/a\u003e, \u003ca href=\"/wiki/sql/drop-text-search-dictionary/?v=18\" title=\"DROP TEXT SEARCH DICTIONARY\"\u003e\u003cspan class=\"refentrytitle\"\u003eDROP TEXT SEARCH DICTIONARY\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e","key":"see_also","title":"See Also"}],"sections_same_as":"","synopsis_html":"ALTER TEXT SEARCH DICTIONARY \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e (\n    \u003cem class=\"replaceable\"\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e [ = \u003cem class=\"replaceable\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e ] [, ... ]\n)\nALTER TEXT SEARCH DICTIONARY \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e RENAME TO \u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_name\u003c/code\u003e\u003c/em\u003e\nALTER TEXT SEARCH DICTIONARY \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e OWNER TO { \u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_owner\u003c/code\u003e\u003c/em\u003e | CURRENT_ROLE | CURRENT_USER | SESSION_USER }\nALTER TEXT SEARCH DICTIONARY \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e SET SCHEMA \u003cem class=\"replaceable\"\u003e\u003ccode\u003enew_schema\u003c/code\u003e\u003c/em\u003e","synopsis_text":"ALTER TEXT SEARCH DICTIONARY name (\noption [ = value ] [, ... ]\n)\nALTER TEXT SEARCH DICTIONARY name RENAME TO new_name\nALTER TEXT SEARCH DICTIONARY name OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }\nALTER TEXT SEARCH DICTIONARY name SET SCHEMA new_schema"}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
