What exactly does it check then? What I pointed out is simple "syntax"
checking in other languages.
From what I have seen it does not check anything in the body of the
function, I can put gibberish in the body as long as it has a begin and end.
It does not seem to be doing anything differently than 8.0.x does with
function syntax checking at create time, so why even mention it in the
the function below also raises no errors at create, but at run time it does.
If I run the below function I get this error:
PostgreSQL Error Code: (1)
ERROR: type "record44" does not exist
From what I read in the release notes I was expecting to see this
raised at create time.
Users coming from systems like Oracle and M$ SQL server are expecting
this stuff to be caught at create not run time.
How difficult would it be to have the server just run the function at
create time with null for any input params? Of course a user could just
do this but it is a annoying second step.
CREATE or REPLACE FUNCTION public.test_func9(out firstname varchar,out
RETURNS SETOF pg_catalog.record AS
sdf bla bla
sdf yada yada
LANGUAGE 'plpgsql' VOLATILE;
Tom Lane wrote:
>Tony Caduto <tony_caduto(at)amsoftwaredesign(dot)com> writes:
>>notice the for in select, it's for sure wrong, but it raises no errors
>>until I execute the function
>>also note the declaration for row, there is no record56 type, but it
>>raises no errors at create.
>It's *syntax* checking, not an exhaustive check that the function is OK.
> regards, tom lane
In response to
pgsql-hackers by date
|Next:||From: Tom Lane||Date: 2005-08-31 18:25:54|
|Subject: Re: On hardcoded type aliases and typmod for user types |
|Previous:||From: Martijn van Oosterhout||Date: 2005-08-31 17:59:10|
|Subject: Re: On hardcoded type aliases and typmod for user types|