Re: "Relation x does not exist" error when x does exist

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Gaurav Priyolkar <gaurav_lists(at)yahoo(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: "Relation x does not exist" error when x does exist
Date: 2001-10-11 20:03:47
Message-ID: Pine.LNX.4.30.0110112126010.841-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net http://funkturm.homeip.net/~peter

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Link 2001-10-11 20:18:53 Understanding explain costs
Previous Message Orion 2001-10-11 19:39:38 Cant get planner to use index (7.1.3-1PGDG)