Hi,
i am following a tutorial video
I am trying to post the function below but keep getting error:
'Failed to create database function: failed to create pg.functions: RETURN cannot have a parameter in function returning void'
'BEGIN
IF (TG_OP = 'INSERT') THEN
UPDATE goals
SET no_tasks = no_tasks + 1
WHERE id = NEW.goal_id;
RETURN NEW;
END IF;'
does anyone understand why?
I am trying to post the function below but keep getting error:
'Failed to create database function: failed to create pg.functions: RETURN cannot have a parameter in function returning void'
'BEGIN
IF (TG_OP = 'INSERT') THEN
UPDATE goals
SET no_tasks = no_tasks + 1
WHERE id = NEW.goal_id;
RETURN NEW;
END IF;'
does anyone understand why?