generate_series
Hi,
I can see schema pg_catalog in Vertica since 12.0, and I can see UDF Transform generate_series there.
But I do not see generate_series mentioned in docs.
And I cannot make generate_series working.
Can you post any example how I can use it.
Thank you
Sergey
0
Answers
you need to use over clause to get it working. please find sample below
test=> SET SEARCH_PATH TO pg_catalog;
SET
test=> select generate_series(1,10) over();
generate_series
(10 rows)
It is definitely something wrong with pg_catalog.generate_series function.
Function should be callable by prefixing with schema name like pg_catalog.generate_series. And it is not. But it works if search path is set.
It is definitely a bug. Please file ticket with engineering.
dev=> select pg_catalog.generate_series(1,10) over();
ERROR 3457: Function pg_catalog.generate_series(int, int) does not exist, or permission is denied for pg_catalog.generate_series(int, int)
HINT: No function matches the given name and argument types. You may need to add explicit type casts
dev=>
dev=>
dev=> set search_path to pg_catalog;
SET
dev=> select pg_catalog.generate_series(1,10) over();
generate_series
(10 rows)
dev=>
Sure. I have filed a JIRA with engineering.