diff --git a/sql/account-update.sql b/sql/account-update.sql index f36d01c07..fa4f6e3ab 100644 --- a/sql/account-update.sql +++ b/sql/account-update.sql @@ -1,7 +1,3 @@ --- Function: comptaproc.account_update(integer, account_type) - --- DROP FUNCTION comptaproc.account_update(integer, account_type); - CREATE OR REPLACE FUNCTION comptaproc.account_update(p_f_id integer, p_account account_type) RETURNS integer AS $BODY$ @@ -50,5 +46,4 @@ begin return 0; end; $BODY$ - LANGUAGE plpgsql VOLATILE - COST 100; +LANGUAGE plpgsql; diff --git a/sql/account_alphanum.sql b/sql/account_alphanum.sql index 532f1a336..b9b7fcb95 100644 --- a/sql/account_alphanum.sql +++ b/sql/account_alphanum.sql @@ -1,7 +1,3 @@ --- Function: comptaproc.account_auto(integer) - --- DROP FUNCTION comptaproc.account_auto(integer); - CREATE OR REPLACE FUNCTION comptaproc.account_alphanum() RETURNS boolean AS $BODY$ @@ -16,5 +12,4 @@ begin return l_auto; end; $BODY$ - LANGUAGE plpgsql VOLATILE - COST 100; + LANGUAGE plpgsql; diff --git a/sql/account_compute.sql b/sql/account_compute.sql index e7ce43e42..c419a8eb4 100644 --- a/sql/account_compute.sql +++ b/sql/account_compute.sql @@ -1,7 +1,3 @@ --- Function: comptaproc.account_compute(integer) - --- DROP FUNCTION comptaproc.account_compute(integer); - CREATE OR REPLACE FUNCTION comptaproc.account_compute(p_f_id integer) RETURNS account_type AS $BODY$ @@ -44,5 +40,5 @@ begin return sResult; end; $BODY$ - LANGUAGE plpgsql VOLATILE - COST 100; +LANGUAGE plpgsql; + diff --git a/sql/account_insert.sql b/sql/account_insert.sql index 480fb19d1..975bff845 100644 --- a/sql/account_insert.sql +++ b/sql/account_insert.sql @@ -1,5 +1,3 @@ --- Function: comptaproc.account_insert(integer, text) - DROP FUNCTION comptaproc.account_insert(integer, text); CREATE OR REPLACE FUNCTION comptaproc.account_insert(p_f_id integer, p_account text) @@ -85,5 +83,5 @@ raise info 'sClass_Base : %',sClass_base; return 0; end; $BODY$ - LANGUAGE plpgsql VOLATILE - COST 100; +LANGUAGE plpgsql; + diff --git a/sql/ajax-direct-form.sql b/sql/ajax-direct-form.sql index 90b7f20fe..277862138 100644 --- a/sql/ajax-direct-form.sql +++ b/sql/ajax-direct-form.sql @@ -57,5 +57,5 @@ begin return; end; $BODY$ - LANGUAGE plpgsql; +LANGUAGE plpgsql; diff --git a/sql/format_account.sql b/sql/format_account.sql index db464eb6e..d1290ccdf 100644 --- a/sql/format_account.sql +++ b/sql/format_account.sql @@ -1,7 +1,3 @@ --- Function: comptaproc.format_account(account_type) - --- DROP FUNCTION comptaproc.format_account(account_type); - CREATE OR REPLACE FUNCTION comptaproc.format_account(p_account account_type) RETURNS account_type AS $BODY$ @@ -22,10 +18,10 @@ end if; return upper(sResult); -end;$BODY$ - LANGUAGE plpgsql VOLATILE - COST 100; - +end; +$BODY$ +LANGUAGE plpgsql; + COMMENT ON FUNCTION comptaproc.format_account(account_type) IS 'format the accounting : - upper case - remove space and special char. diff --git a/sql/tmp_pcmn_alphanum_ins_upd.sql b/sql/tmp_pcmn_alphanum_ins_upd.sql index 4c59f2e02..db9bc2a08 100644 --- a/sql/tmp_pcmn_alphanum_ins_upd.sql +++ b/sql/tmp_pcmn_alphanum_ins_upd.sql @@ -11,5 +11,4 @@ r_record.pcm_val:=format_account(NEW.pcm_val); return r_record; end; $BODY$ - LANGUAGE plpgsql VOLATILE - COST 100; +LANGUAGE plpgsql; diff --git a/sql/tmp_pcmn_ins.sql b/sql/tmp_pcmn_ins.sql index 53623c378..aa86c88de 100644 --- a/sql/tmp_pcmn_ins.sql +++ b/sql/tmp_pcmn_ins.sql @@ -1,8 +1,4 @@ --- Function: comptaproc.tmp_pcmn_ins() - --- DROP FUNCTION comptaproc.tmp_pcmn_ins(); - -CREATE OR REPLACE FUNCTION comptaproc.tmp_pcmn_ins() +ZCREATE OR REPLACE FUNCTION comptaproc.tmp_pcmn_ins() RETURNS trigger AS $BODY$ declare @@ -16,5 +12,5 @@ end if; return NEW; end; $BODY$ - LANGUAGE plpgsql VOLATILE - COST 100; +LANGUAGE plpgsql; + diff --git a/sql/trigger.tmp_pcmn.sql b/sql/trigger.tmp_pcmn.sql index 6c8d21e07..69c3c8bc7 100644 --- a/sql/trigger.tmp_pcmn.sql +++ b/sql/trigger.tmp_pcmn.sql @@ -1,7 +1,3 @@ --- Trigger: t_tmp_pcm_alphanum_ins_upd on tmp_pcmn - --- DROP TRIGGER t_tmp_pcm_alphanum_ins_upd ON tmp_pcmn; - CREATE TRIGGER t_tmp_pcm_alphanum_ins_upd BEFORE INSERT OR UPDATE ON tmp_pcmn diff --git a/sql/tva.sql b/sql/tva.sql index 2bf18e3df..5c694c6ff 100644 --- a/sql/tva.sql +++ b/sql/tva.sql @@ -40,7 +40,7 @@ update tva_rate set tva_label=p_tva_label,tva_rate=p_tva_rate,tva_comment=p_tva_ return 0; end; $function$ - LANGUAGE plpgsql; +LANGUAGE plpgsql; ---------------------------------------------------------------------- -- TVA INSERT @@ -82,4 +82,4 @@ insert into tva_rate(tva_id,tva_label,tva_rate,tva_comment,tva_poste,tva_both_si return 0; end; $function$ - LANGUAGE plpgsql; +LANGUAGE plpgsql;