CREATE OR REPLACE FUNCTION “pg”.“teie”(“i_title” varchar)
RETURNS “pg_catalog”.“varchar” AS
B
O
D
Y
BODY
BODY
DECLARE
t_count int4;
begin
–先删除
delete from pg.dual t
where t.title =i_title
;
–修改为失效
update pg.dual t
set status=0 --删除状态 0 ,1
where t.title =i_title ;
return ‘1’;
END;
B
O
D
Y
BODY
BODY
LANGUAGE plpgsql VOLATILE
COST 100