Task #5689 : improve calc online

This commit is contained in:
sparkyx 2006-06-29 16:45:18 +00:00
parent 1adf667b36
commit 725c0cb9ea
4 changed files with 129 additions and 49 deletions

View file

@ -1,20 +1,2 @@
drop function action_gestion_replace_newline() cascade;
alter table action_gestion add column ag_ref_ag_id int4;
create or replace function action_gestion_replace_newline ()
returns trigger
as
$body$
declare
modified action_gestion%rowtype;
begin
modified:=NEW;
modified.ag_comment:=replace(modified.ag_comment,'%0A','');
modified.ag_comment:=replace(modified.ag_comment,'%0D','');
return modified;
end;
$body$ language plpgsql;
create trigger tr_ag_comment_replace before insert or update on action_gestion
for each row execute procedure action_gestion_replace_newline();