Gaurav Priyolkar writes:
> test=> SELECT foo();
> ERROR: Relation 5483738 does not exist
> test=>
> test=> SELECT relname, relfilenode FROM pg_class WHERE relfilenode=5483738;
> relname | relfilenode
> ---------+-------------
> foo_1 | 5483738
> (1 row)
relfilenode has nothing to do with that.
PL/pgSQL compiles and caches the functions you are executing, so if you
change the database schema under it (or in it) you lose. This is an
intentional design choice. If you want to execute code dynamically you
should look at the EXECUTE command in PL/pgSQL, or for some other
language.
--
Peter Eisentraut peter_e(at)gmx(dot)net http://funkturm.homeip.net/~peter