How to call a function, PostgreSQL
For Postgresql you can use PERFORM. PERFORM is only valid within PL/PgSQL procedure language.
DO $$ BEGIN
PERFORM "saveUser"(3, 'asd','asd','asd','asd','asd');
END $$;
The suggestion from the postgres team:
HINT: If you want to discard the results of a SELECT, use PERFORM instead.
We can have two ways of calling the functions written in pgadmin for postgre sql database.
Suppose we have defined the function as below:
CREATE OR REPLACE FUNCTION helloWorld(name text) RETURNS void AS $helloWorld$
DECLARE
BEGIN
RAISE LOG 'Hello, %', name;
END;
$helloWorld$ LANGUAGE plpgsql;
We can call the function helloworld in one of the following way:
SELECT "helloworld"('myname');
SELECT public.helloworld('myname')
The function call still should be a valid SQL statement:
SELECT "saveUser"(3, 'asd','asd','asd','asd','asd');
if your function does not want to return anything you should declare it to "return void" and then you can call it like this "perform functionName(parameter...);"