I'm trying to create a trigger function that simply calls a function within an if statement:
CREATE OR REPLACE FUNCTION public."onTrack"()
RETURNS trigger
LANGUAGE 'plpgsql'
AS $BODY$
BEGIN
IF (TG_OP = 'INSERT') THEN
"updateUserStats"(NEW."userId");
ELSIF (TG_OP = 'DELETE') THEN
"updateUserStats"(OLD."userId");
END IF
RETURN NULL
END
$BODY$;
However, when I try to create the function, I get this error
I'm not sure what I'm doing wrong, as according to the docs, this syntax is correct. Removing the quotes around the functions will not work as the name is case sensitive and also is still a syntax error.
I am on version "PostgreSQL 9.5.14"

perform updateUserStats(NEW.userId);?END IFandRETURN NULL"onTrack","userId", ...) they are much more trouble than they are worth it.