How to access LISTAGG or GROUP_CONCAT in Vertica 9.3?

edited November 2020 in General Discussion

How to install and access LISTAGG or GROUP_CONCAT in Vertica 9.3? I'm under the impression the LISTAGG is standard in 9.2 and the .cpp files were available in 7.1.

=> SELECT VERSION();
              VERSION               
------------------------------------
 Vertica Analytic Database v9.3.1-8
(1 row)
=> SELECT manufact, LISTAGG(model) FROM test.car_sales GROUP BY manufact;
ERROR 3457:  Function LISTAGG(varchar) does not exist, or permission is denied for LISTAGG(varchar)
HINT:  No function matches the given name and argument types. You may need to add explicit type casts
=> SELECT manufact, GROUP_CONCAT(model) FROM test.car_sales GROUP BY 1;
ERROR 3457:  Function GROUP_CONCAT(varchar) does not exist, or permission is denied for GROUP_CONCAT(varchar)
HINT:  No function matches the given name and argument types. You may need to add explicit type casts

Best Answer

  • Ariel_CaryAriel_Cary Vertica Employee Employee
    Answer ✓

    LISTAGG doesn't need special permissions. PUBLIC has execution privilege. Try running this query to verify the functionality is installed
    vsql -f /opt/vertica/packages/VFunctions/ddl/isinstalled.sql
    If it's not, you can re-install it with admintools.

Answers

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file