由于某些原因我试图用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