I'm still a bit confused. If I replace the ROLLBACK; command with ELEPHANT; the result is a syntax error. Why doesn't ROLLBACK; produce the same error since it is not valid in the LANGUAGE plpgsql. I understand that "ROLLBACK TO SAVEPOINT" IS valid. But it's not the same thing.