创建函数自动更新修改字段

create or replace function update_timestamp() returns trigger as
$$
begin
new.update_date = current_timestamp;
new.updatedate = current_timestamp;
new.modify_date = current_timestamp;
return new;
end
$$
language plpgsql;

posted @ 2022-08-01 15:21  徐徐图之  阅读(34)  评论(0编辑  收藏  举报