简体   繁体   中英

How to install the cube function for Postgresql

when I just run the sample statements like below:

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

but facing the error:

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=# 

Can anyone help me? Is there any place I need to setup or need to install the function separately.

The cube_union() function is provided by the extension cube

To install an extension you need create extension

An extension is installed per database, so you need to connect to the database you are using as a super user, then run:

create extension cube;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM