{
    "content": [
        {
            "type": "text",
            "text": "# ALTER_TEXT_SEARCH_CONFIGURATION(7) (man)\n\n**Summary:** ALTERTEXTSEARCHCONFIGURATION - change the definition of a text search configuration\n\n**Synopsis:** ALTER TEXT SEARCH CONFIGURATION name\nADD MAPPING FOR tokentype [, ... ] WITH dictionaryname [, ... ]\nALTER TEXT SEARCH CONFIGURATION name\nALTER MAPPING FOR tokentype [, ... ] WITH dictionaryname [, ... ]\nALTER TEXT SEARCH CONFIGURATION name\nALTER MAPPING REPLACE olddictionary WITH newdictionary\nALTER TEXT SEARCH CONFIGURATION name\nALTER MAPPING FOR tokentype [, ... ] REPLACE olddictionary WITH newdictionary\nALTER TEXT SEARCH CONFIGURATION name\nDROP MAPPING [ IF EXISTS ] FOR tokentype [, ... ]\nALTER TEXT SEARCH CONFIGURATION name RENAME TO newname\nALTER TEXT SEARCH CONFIGURATION name OWNER TO { newowner | CURRENTROLE | CURRENTUSER | SESSIONUSER }\nALTER TEXT SEARCH CONFIGURATION name SET SCHEMA newschema\n\n## Examples\n\n- `The following example replaces the english dictionary with the swedish dictionary anywhere`\n- `that english is used within myconfig.`\n- `ALTER TEXT SEARCH CONFIGURATION myconfig`\n- `ALTER MAPPING REPLACE english WITH swedish;`\n\n## See Also\n\n- CREATETEXTSEARCHCONFIGURATION(7)\n- DROPTEXTSEARCHCONFIGURATION(7)\n- CONFIGURATION(7)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (14 lines)\n- **DESCRIPTION** (6 lines)\n- **PARAMETERS** (35 lines)\n- **EXAMPLES** (6 lines)\n- **COMPATIBILITY** (2 lines)\n- **SEE ALSO** (6 lines)\n\n## Full Content\n\n### NAME\n\nALTERTEXTSEARCHCONFIGURATION - change the definition of a text search configuration\n\n### SYNOPSIS\n\nALTER TEXT SEARCH CONFIGURATION name\nADD MAPPING FOR tokentype [, ... ] WITH dictionaryname [, ... ]\nALTER TEXT SEARCH CONFIGURATION name\nALTER MAPPING FOR tokentype [, ... ] WITH dictionaryname [, ... ]\nALTER TEXT SEARCH CONFIGURATION name\nALTER MAPPING REPLACE olddictionary WITH newdictionary\nALTER TEXT SEARCH CONFIGURATION name\nALTER MAPPING FOR tokentype [, ... ] REPLACE olddictionary WITH newdictionary\nALTER TEXT SEARCH CONFIGURATION name\nDROP MAPPING [ IF EXISTS ] FOR tokentype [, ... ]\nALTER TEXT SEARCH CONFIGURATION name RENAME TO newname\nALTER TEXT SEARCH CONFIGURATION name OWNER TO { newowner | CURRENTROLE | CURRENTUSER | SESSIONUSER }\nALTER TEXT SEARCH CONFIGURATION name SET SCHEMA newschema\n\n### DESCRIPTION\n\nALTER TEXT SEARCH CONFIGURATION changes the definition of a text search configuration. You\ncan modify its mappings from token types to dictionaries, or change the configuration's name\nor owner.\n\nYou must be the owner of the configuration to use ALTER TEXT SEARCH CONFIGURATION.\n\n### PARAMETERS\n\nname\nThe name (optionally schema-qualified) of an existing text search configuration.\n\ntokentype\nThe name of a token type that is emitted by the configuration's parser.\n\ndictionaryname\nThe name of a text search dictionary to be consulted for the specified token type(s). If\nmultiple dictionaries are listed, they are consulted in the specified order.\n\nolddictionary\nThe name of a text search dictionary to be replaced in the mapping.\n\nnewdictionary\nThe name of a text search dictionary to be substituted for olddictionary.\n\nnewname\nThe new name of the text search configuration.\n\nnewowner\nThe new owner of the text search configuration.\n\nnewschema\nThe new schema for the text search configuration.\n\nThe ADD MAPPING FOR form installs a list of dictionaries to be consulted for the specified\ntoken type(s); it is an error if there is already a mapping for any of the token types. The\nALTER MAPPING FOR form does the same, but first removing any existing mapping for those token\ntypes. The ALTER MAPPING REPLACE forms substitute newdictionary for olddictionary anywhere\nthe latter appears. This is done for only the specified token types when FOR appears, or for\nall mappings of the configuration when it doesn't. The DROP MAPPING form removes all\ndictionaries for the specified token type(s), causing tokens of those types to be ignored by\nthe text search configuration. It is an error if there is no mapping for the token types,\nunless IF EXISTS appears.\n\n### EXAMPLES\n\nThe following example replaces the english dictionary with the swedish dictionary anywhere\nthat english is used within myconfig.\n\nALTER TEXT SEARCH CONFIGURATION myconfig\nALTER MAPPING REPLACE english WITH swedish;\n\n### COMPATIBILITY\n\nThere is no ALTER TEXT SEARCH CONFIGURATION statement in the SQL standard.\n\n### SEE ALSO\n\nCREATE TEXT SEARCH CONFIGURATION (CREATETEXTSEARCHCONFIGURATION(7)), DROP TEXT SEARCH\nCONFIGURATION (DROPTEXTSEARCHCONFIGURATION(7))\n\n\n\nPostgreSQL 14.23                                2026              ALTER TEXT SEARCH CONFIGURATION(7)\n\n"
        }
    ],
    "structuredContent": {
        "command": "ALTER_TEXT_SEARCH_CONFIGURATION",
        "section": "7",
        "mode": "man",
        "summary": "ALTERTEXTSEARCHCONFIGURATION - change the definition of a text search configuration",
        "synopsis": "ALTER TEXT SEARCH CONFIGURATION name\nADD MAPPING FOR tokentype [, ... ] WITH dictionaryname [, ... ]\nALTER TEXT SEARCH CONFIGURATION name\nALTER MAPPING FOR tokentype [, ... ] WITH dictionaryname [, ... ]\nALTER TEXT SEARCH CONFIGURATION name\nALTER MAPPING REPLACE olddictionary WITH newdictionary\nALTER TEXT SEARCH CONFIGURATION name\nALTER MAPPING FOR tokentype [, ... ] REPLACE olddictionary WITH newdictionary\nALTER TEXT SEARCH CONFIGURATION name\nDROP MAPPING [ IF EXISTS ] FOR tokentype [, ... ]\nALTER TEXT SEARCH CONFIGURATION name RENAME TO newname\nALTER TEXT SEARCH CONFIGURATION name OWNER TO { newowner | CURRENTROLE | CURRENTUSER | SESSIONUSER }\nALTER TEXT SEARCH CONFIGURATION name SET SCHEMA newschema",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [
            "The following example replaces the english dictionary with the swedish dictionary anywhere",
            "that english is used within myconfig.",
            "ALTER TEXT SEARCH CONFIGURATION myconfig",
            "ALTER MAPPING REPLACE english WITH swedish;"
        ],
        "see_also": [
            {
                "name": "CREATETEXTSEARCHCONFIGURATION",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/CREATETEXTSEARCHCONFIGURATION/7/json"
            },
            {
                "name": "DROPTEXTSEARCHCONFIGURATION",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/DROPTEXTSEARCHCONFIGURATION/7/json"
            },
            {
                "name": "CONFIGURATION",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/CONFIGURATION/7/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 14,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "PARAMETERS",
                "lines": 35,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "COMPATIBILITY",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "ALTERTEXTSEARCHCONFIGURATION - change the definition of a text search configuration\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "ALTER TEXT SEARCH CONFIGURATION name\nADD MAPPING FOR tokentype [, ... ] WITH dictionaryname [, ... ]\nALTER TEXT SEARCH CONFIGURATION name\nALTER MAPPING FOR tokentype [, ... ] WITH dictionaryname [, ... ]\nALTER TEXT SEARCH CONFIGURATION name\nALTER MAPPING REPLACE olddictionary WITH newdictionary\nALTER TEXT SEARCH CONFIGURATION name\nALTER MAPPING FOR tokentype [, ... ] REPLACE olddictionary WITH newdictionary\nALTER TEXT SEARCH CONFIGURATION name\nDROP MAPPING [ IF EXISTS ] FOR tokentype [, ... ]\nALTER TEXT SEARCH CONFIGURATION name RENAME TO newname\nALTER TEXT SEARCH CONFIGURATION name OWNER TO { newowner | CURRENTROLE | CURRENTUSER | SESSIONUSER }\nALTER TEXT SEARCH CONFIGURATION name SET SCHEMA newschema\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "ALTER TEXT SEARCH CONFIGURATION changes the definition of a text search configuration. You\ncan modify its mappings from token types to dictionaries, or change the configuration's name\nor owner.\n\nYou must be the owner of the configuration to use ALTER TEXT SEARCH CONFIGURATION.\n",
                "subsections": []
            },
            "PARAMETERS": {
                "content": "name\nThe name (optionally schema-qualified) of an existing text search configuration.\n\ntokentype\nThe name of a token type that is emitted by the configuration's parser.\n\ndictionaryname\nThe name of a text search dictionary to be consulted for the specified token type(s). If\nmultiple dictionaries are listed, they are consulted in the specified order.\n\nolddictionary\nThe name of a text search dictionary to be replaced in the mapping.\n\nnewdictionary\nThe name of a text search dictionary to be substituted for olddictionary.\n\nnewname\nThe new name of the text search configuration.\n\nnewowner\nThe new owner of the text search configuration.\n\nnewschema\nThe new schema for the text search configuration.\n\nThe ADD MAPPING FOR form installs a list of dictionaries to be consulted for the specified\ntoken type(s); it is an error if there is already a mapping for any of the token types. The\nALTER MAPPING FOR form does the same, but first removing any existing mapping for those token\ntypes. The ALTER MAPPING REPLACE forms substitute newdictionary for olddictionary anywhere\nthe latter appears. This is done for only the specified token types when FOR appears, or for\nall mappings of the configuration when it doesn't. The DROP MAPPING form removes all\ndictionaries for the specified token type(s), causing tokens of those types to be ignored by\nthe text search configuration. It is an error if there is no mapping for the token types,\nunless IF EXISTS appears.\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "The following example replaces the english dictionary with the swedish dictionary anywhere\nthat english is used within myconfig.\n\nALTER TEXT SEARCH CONFIGURATION myconfig\nALTER MAPPING REPLACE english WITH swedish;\n",
                "subsections": []
            },
            "COMPATIBILITY": {
                "content": "There is no ALTER TEXT SEARCH CONFIGURATION statement in the SQL standard.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "CREATE TEXT SEARCH CONFIGURATION (CREATETEXTSEARCHCONFIGURATION(7)), DROP TEXT SEARCH\nCONFIGURATION (DROPTEXTSEARCHCONFIGURATION(7))\n\n\n\nPostgreSQL 14.23                                2026              ALTER TEXT SEARCH CONFIGURATION(7)",
                "subsections": []
            }
        }
    }
}