Re: Temp tables and functions

From: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
To: mark(dot)dingee(at)cox(dot)net
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Temp tables and functions
Date: 2006-10-11 02:11:51
Message-ID: 20061011021151.GI72517@nasby.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Tue, Oct 10, 2006 at 03:21:36PM -0400, mark(dot)dingee(at)cox(dot)net wrote:
> Everyone,
>
> I've written a function (language = sql) which uses a temporary table to simplify the process; however, when I go to load the function I get:
>
> /var/lib/pgsql$cat thm.sql | psql test
> ERROR: relation "lost_bus" does not exist
>
> where "lost_bus" is the name of my temp table. The function is just for a report that is run monthly, so I can create a permanent table if necessary, but I'd rather not.

Create the temp table in your script that creates the function. You
don't need to populate it or anything, you just need it to exist
(prefferably with the correct definition).
--
Jim Nasby jim(at)nasby(dot)net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Mark R. Dingee 2006-10-11 11:02:47 Re: Temp tables and functions
Previous Message Dirk Jagdmann 2006-10-10 21:57:26 Re: storing access rights in a postgres database