From: | <tony_caduto(at)amsoftwaredesign(dot)com> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | function body error checking issues |
Date: | 2005-02-21 18:05:09 |
Message-ID: | 200502211805.j1LI59Px024651@mail2.atl.registeredsite.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Bruce,
This function which has even more errors also raises no errors when run in the query editor:
CREATE or replace function annual.get_ratio72( float8, float8)
RETURNS pg_catalog.float8 AS
$BODY$
DECLARE
execptioncount_in alias for $1;
questioncount_in alias for $2;
IF (execptioncount_in >0) AND (questioncount_in >0) --THEN
RATIO_OUT = execptioncount_in / questioncount_in;
ELSE
--this variable is not declared, yet when I run this query no error is raised
EXCEPTIONRATIO_OUT = 0;
END;
return ratio_out;
END;
$BODY$
LANGUAGE 'plpgsql' VOLATILE;
> From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
> Date: 2005/02/21 Mon AM 10:47:35 EST
> To: tony_caduto(at)amsoftwaredesign(dot)com
> CC: pgsql-general(at)postgresql(dot)org
> Subject: Re: [GENERAL] is there anyway to get the backends IP address from
>
> Tony Caduto wrote:
> > Bruce,
> > On another note, is there plans to improve the type checking of stored
> > functions during the save/compile?
> > Currently I can pretty much make tons of mistakes (on purpose of course
> > :-) and they are not flagged as errors until runtime.
> > The biggest complaint I see from other DBAs (MS SQL, Oracle) is that
> > Postgres does little to no pre-runtime type checking.
>
> We have no plans to improve that. We do have 'check_function_bodies'
> which defaults to true and does some checking. Would you give us a
> particular example you would like improved?
>
> --
> Bruce Momjian | http://candle.pha.pa.us
> pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
> + If your life is a hard drive, | 13 Roberts Road
> + Christ can be your backup. | Newtown Square, Pennsylvania 19073
>
From | Date | Subject | |
---|---|---|---|
Next Message | Noel Whelan | 2005-02-21 18:10:32 | ideally a non-volatile function? |
Previous Message | Oisin Glynn | 2005-02-21 18:00:03 | Re: is there anyway to get the backends IP address from |