Re: "Relation x does not exist" error when x does exist - Mailing list pgsql-general

From Peter Eisentraut
Subject Re: "Relation x does not exist" error when x does exist
Date
Msg-id Pine.LNX.4.30.0110112126010.841-100000@peter.localdomain
Whole thread Raw
In response to "Relation x does not exist" error when x does exist  (Gaurav Priyolkar <gaurav_lists@yahoo.com>)
List pgsql-general
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@gmx.net   http://funkturm.homeip.net/~peter


pgsql-general by date:

Previous
From: elwood@agouros.de (Konstantinos Agouros)
Date:
Subject: Unixtime from timedate?
Next
From: tony
Date:
Subject: Re: Performance problem with 50,000,000 rows