在$$的plpgsql syntx错误

时间:2016-12-09 11:27:14

标签: sql postgresql

由于某些原因我试图用plpgsql编写函数我在$$ language plpgsql;

时遇到语法错误

这是我写的功能:

create or replace function hello() returns trigger as $$
begin
    if new.my_sc!= null and new.his_sc!= null
    then update people p 
    set p.score=p.score+1 
    where p.id = new.id;
end if;
return null;
$$ language plpgsql;

我的触发器:

after insert on game
execute procedure hello();

我的语法错误出现在最后一行。 任何的想法? Thankx

0 个答案:

没有答案