Tony,
> 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.
Nope:
stp=# create function bad_stuff ( x boolean ) returns boolean as $x$
stp$# begin
stp$# afasdfasdfasdf;
stp$# afasdfasdfa;
stp$# asdfasfasdf;
stp$# end;
stp$# $x$ language plpgsql;
ERROR: syntax error at or near "afasdfasdfasdf" at character 1
QUERY: afasdfasdfasdf
CONTEXT: SQL statement in PL/PgSQL function "bad_stuff" near line 2
ERROR: syntax error at or near "afasdfasdfasdf" at character 1
QUERY: afasdfasdfasdf
CONTEXT: SQL statement in PL/PgSQL function "bad_stuff" near line 2
LINE 1: afasdfasdfasdf
Are you sure you don't have check_function_bodies = Off?
There is a difference between *syntax* errors and *sql* errors. If a
table does not exist, we don't want to check for that and bounce the
function; possibly the function will only be called in a context where the
table does exist.
--
--Josh
Josh Berkus
Aglio Database Solutions
San Francisco