Richard Huxton <dev(at)archonet(dot)com> writes:
> => CREATE OR REPLACE FUNCTION func_b() RETURNS SETOF int AS $$
> SELECT id FROM table_a;
> $$ LANGUAGE sql SET search_path = alpha;
> ERROR: relation "table_a" does not exist
Hmmm, I'll bet the validator forgets to apply the parameter modification.
In plpgsql we had to dumb down the validator to do only a bare
syntax check and not any semantic validation. Perhaps SQL function
validation should act the same? You can certainly think of plenty
of other reasons why a full semantics check might fail at function
definition time.
regards, tom lane