{
    "content": [
        {
            "type": "text",
            "text": "# DROP_AGGREGATE (man)\n\n## NAME\n\nDROPAGGREGATE - remove an aggregate function\n\n## SYNOPSIS\n\nDROP AGGREGATE [ IF EXISTS ] name ( aggregatesignature ) [, ...] [ CASCADE | RESTRICT ]\nwhere aggregatesignature is:\n* |\n[ argmode ] [ argname ] argtype [ , ... ] |\n[ [ argmode ] [ argname ] argtype [ , ... ] ] ORDER BY [ argmode ] [ argname ] argtype [ , ... ]\n\n## DESCRIPTION\n\nDROP AGGREGATE removes an existing aggregate function. To execute this command the current\nuser must be the owner of the aggregate function.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **PARAMETERS**\n- **NOTES**\n- **EXAMPLES**\n- **COMPATIBILITY**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "DROP_AGGREGATE",
        "section": "",
        "mode": "man",
        "summary": "DROPAGGREGATE - remove an aggregate function",
        "synopsis": "DROP AGGREGATE [ IF EXISTS ] name ( aggregatesignature ) [, ...] [ CASCADE | RESTRICT ]\nwhere aggregatesignature is:\n* |\n[ argmode ] [ argname ] argtype [ , ... ] |\n[ [ argmode ] [ argname ] argtype [ , ... ] ] ORDER BY [ argmode ] [ argname ] argtype [ , ... ]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [
            "To remove the aggregate function myavg for type integer:",
            "DROP AGGREGATE myavg(integer);",
            "To remove the hypothetical-set aggregate function myrank, which takes an arbitrary list of",
            "ordering columns and a matching list of direct arguments:",
            "DROP AGGREGATE myrank(VARIADIC \"any\" ORDER BY VARIADIC \"any\");",
            "To remove multiple aggregate functions in one command:",
            "DROP AGGREGATE myavg(integer), myavg(bigint);"
        ],
        "see_also": [
            {
                "name": "ALTERAGGREGATE",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/ALTERAGGREGATE/7/json"
            },
            {
                "name": "CREATEAGGREGATE",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/CREATEAGGREGATE/7/json"
            },
            {
                "name": "AGGREGATE",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/AGGREGATE/7/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "PARAMETERS",
                "lines": 27,
                "subsections": []
            },
            {
                "name": "NOTES",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 13,
                "subsections": []
            },
            {
                "name": "COMPATIBILITY",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "DROPAGGREGATE - remove an aggregate function\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "DROP AGGREGATE [ IF EXISTS ] name ( aggregatesignature ) [, ...] [ CASCADE | RESTRICT ]\n\nwhere aggregatesignature is:\n\n* |\n[ argmode ] [ argname ] argtype [ , ... ] |\n[ [ argmode ] [ argname ] argtype [ , ... ] ] ORDER BY [ argmode ] [ argname ] argtype [ , ... ]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "DROP AGGREGATE removes an existing aggregate function. To execute this command the current\nuser must be the owner of the aggregate function.\n",
                "subsections": []
            },
            "PARAMETERS": {
                "content": "IF EXISTS\nDo not throw an error if the aggregate does not exist. A notice is issued in this case.\n\nname\nThe name (optionally schema-qualified) of an existing aggregate function.\n\nargmode\nThe mode of an argument: IN or VARIADIC. If omitted, the default is IN.\n\nargname\nThe name of an argument. Note that DROP AGGREGATE does not actually pay any attention to\nargument names, since only the argument data types are needed to determine the aggregate\nfunction's identity.\n\nargtype\nAn input data type on which the aggregate function operates. To reference a zero-argument\naggregate function, write * in place of the list of argument specifications. To reference\nan ordered-set aggregate function, write ORDER BY between the direct and aggregated\nargument specifications.\n\nCASCADE\nAutomatically drop objects that depend on the aggregate function (such as views using\nit), and in turn all objects that depend on those objects (see Section 5.14).\n\nRESTRICT\nRefuse to drop the aggregate function if any objects depend on it. This is the default.\n",
                "subsections": []
            },
            "NOTES": {
                "content": "Alternative syntaxes for referencing ordered-set aggregates are described under ALTER\nAGGREGATE (ALTERAGGREGATE(7)).\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "To remove the aggregate function myavg for type integer:\n\nDROP AGGREGATE myavg(integer);\n\nTo remove the hypothetical-set aggregate function myrank, which takes an arbitrary list of\nordering columns and a matching list of direct arguments:\n\nDROP AGGREGATE myrank(VARIADIC \"any\" ORDER BY VARIADIC \"any\");\n\nTo remove multiple aggregate functions in one command:\n\nDROP AGGREGATE myavg(integer), myavg(bigint);\n",
                "subsections": []
            },
            "COMPATIBILITY": {
                "content": "There is no DROP AGGREGATE statement in the SQL standard.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "ALTER AGGREGATE (ALTERAGGREGATE(7)), CREATE AGGREGATE (CREATEAGGREGATE(7))\n\n\n\nPostgreSQL 14.23                                2026                               DROP AGGREGATE(7)",
                "subsections": []
            }
        }
    }
}