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   [EMAIL PROTECTED]   http://funkturm.homeip.net/~peter


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to