Re: Temporary tables inside functions problem

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Avi Schwartz <avi(at)CFFtechnologies(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Temporary tables inside functions problem
Date: 2003-06-08 19:53:01
Message-ID: 20030608125203.V99603-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Sat, 7 Jun 2003, Avi Schwartz wrote:

> I have a function (func2) which creates 2 temporary tables when it
> starts and drops them before it returns.
> Another function (func1) calls func2.
>
> From psql:
> Calling func2 directly works fine.
> Calling func1 which in turn calls func2 works fine.
>
> From ColdFusion MX:
> If I call func2 directly from within ColdFusion it works fine.
> If I call func1 which in turn calls func2 from within ColdFusion, I get
> the following error:
>
> ERROR: pg_class_aclcheck: relation 8392689 not found
> WARNING: Error occurred while executing PL/pgSQL function func2

If you want to work with temporary tables from inside plpgsql or with
other tables that you're creating and dropping, you'll need to use EXECUTE
for the queries that use the table so that it won't cache the query plan.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ian Barwick 2003-06-08 19:54:59 Re: Temporary tables inside functions problem
Previous Message Patrick Welche 2003-06-08 19:02:18 Re: check constraint