首页 > 解决方案 > 如何为 Postgresql 安装多维数据集功能

问题描述

当我只运行如下示例语句时:

select cube_union('(0,5,2),(2,3,1)', '0')

但面临错误:

postgres=# select cube_union('(0,5,2),(2,3,1)', '0');
ERROR:  function cube_union(unknown, unknown) does not exist
LINE 1: select cube_union('(0,5,2),(2,3,1)', '0');
               ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
postgres=# 

谁能帮我?有没有我需要设置或需要单独安装功能的地方。

标签: postgresql

解决方案


cube_union()功能由扩展立方体提供

要安装扩展,您需要创建扩展

每个数据库都安装了一个扩展,因此您需要以超级用户身份连接到您正在使用的数据库,然后运行:

create extension cube;

推荐阅读