Unable to execute function manually via workbench in redshift DB

We have connected redshift DB in sql-workbench/aginity. I am able to create function but I couldn't EXECUTE that created function in workbench. Below is the sample syntax we tried to call the function.

execute public.test_function
execute test_function

By the way, is the correct syntax to execute a function?

Upvotes: 0

Views: 231

Answers (1)

user330315
user330315

Reputation:

As documented in the manual execute is used to run a prepared statement - not a function.

To "execute" a function, call it with a select statement:

select test_function();

Upvotes: 1

Related Questions