Answer the question
In order to leave comments, you need to log in
How to create a function with parameters in DBeaver (in postgres)?
In DBeaver, an empty function is created by right-clicking on Functions -> Create New Function
After creation, it is added to this section with functions and looks like this:
How to add parameters to it?
There is nothing to add here.
Adding parameters in brackets:
CREATE OR REPLACE FUNCTION public."_test_func"(column_name character varying, column_table character varying)
Answer the question
In order to leave comments, you need to log in
You cannot add parameters to an existing function with the same name - PG has polymorphism of functions: functions with the same name but different parameters are different functions.
Delete this one, create a new one (via SQL: CREATE FUNCTION). I won't tell you exactly how to edit the parameters in dbeaver.
in DBeaver I create functions in the menu: "SQL Editor" | "New SQL Editor"
i.e. in the built-in query editor.
As galaxy rightly noted, a function with the same name can have a different set of parameter types.
For example, I have these:
public.actorprotocolday(varchar, bpchar);
and
public.actorprotocolday(varchar, bpchar, int);
and if you have any l.b. one of them is wrong, delete it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question