关于 YMatrix
部署数据库
使用数据库
管理集群
最佳实践
高级功能
高级查询
联邦查询
Grafana 监控
备份恢复
灾难恢复
管理手册
性能调优
故障诊断
工具指南
系统配置参数
SQL 参考
删除一个聚合函数。
DROP AGGREGATE [IF EXISTS] <name> ( <aggregate_signature> ) [, ...] [CASCADE | RESTRICT]
where <aggregate_signature> is:
* |
[ <argmode> ] [ <argname> ] <argtype> [ , ... ] |
[ [ <argmode> ] [ <argname> ] <argtype> [ , ... ] ] ORDER BY [ <argmode> ] [ <argname> ] <argtype> [ , ... ]
Description
DROP AGGREGATE removes an existing aggregate function. To run this command the current user must be the owner of the aggregate function.
有关引用有序集合聚合的替代语法,请参阅ALTER AGGREGATE。
要删除针对整数类型的聚合函数 myavg:
DROP AGGREGATE myavg(integer);
移除假设集聚合函数 myrank,该函数接受任意排序列列表及其对应的直接参数列表:
DROP AGGREGATE myrank(VARIADIC "any" ORDER BY VARIADIC "any");
要通过一条命令移除多个聚合函数:
DROP AGGREGATE myavg(integer), myavg(bigint);
SQL标准中不存在DROP AGGREGATE语句。