Calling functions with exec instead of select

use PERFORM statement – http://www.postgresql.org/docs/current/static/plpgsql-statements.html

Sometimes it is useful to evaluate an expression or SELECT query but
discard the result, for example when calling a function that has
side-effects but no useful result value. To do this in PL/pgSQL, use
the PERFORM statement

so it’s just

DO $$ BEGIN
    PERFORM my_function();
END $$;

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)