Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> writes:
>> ALTER FUNCTION numpeople() AS
>> 'SELECT COUNT(*) FROM managers' LANGUAGE 'plpgsql';
> Actually, I think this would still work, because it
> doesn't check the table name existance until it's
> used for the first time, not when it's created.
But SQL-language function bodies are checked at entry, not only
at first use. (I consider it a deficiency of plpgsql that it
doesn't do likewise.)
regards, tom lane