pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedTemp tables and functions
3+ messages / 3 participants
[nested] [flat]
* Temp tables and functions
@ 2006-10-10 19:21 mark.dingee@cox.net
2006-10-11 02:11 ` Re: Temp tables and functions Jim C. Nasby <jim@nasby.net>
0 siblings, 1 reply; 3+ messages in thread
From: mark.dingee@cox.net @ 2006-10-10 19:21 UTC (permalink / raw)
To: pgsql-sql
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.
Thanks in advance
Mark
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Temp tables and functions
2006-10-10 19:21 Temp tables and functions mark.dingee@cox.net
@ 2006-10-11 02:11 ` Jim C. Nasby <jim@nasby.net>
2006-10-11 11:02 ` Re: Temp tables and functions Mark R. Dingee <mark.dingee@cox.net>
0 siblings, 1 reply; 3+ messages in thread
From: Jim C. Nasby @ 2006-10-11 02:11 UTC (permalink / raw)
To: mark.dingee@cox.net; +Cc: pgsql-sql
On Tue, Oct 10, 2006 at 03:21:36PM -0400, mark.dingee@cox.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@nasby.net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Temp tables and functions
2006-10-10 19:21 Temp tables and functions mark.dingee@cox.net
2006-10-11 02:11 ` Re: Temp tables and functions Jim C. Nasby <jim@nasby.net>
@ 2006-10-11 11:02 ` Mark R. Dingee <mark.dingee@cox.net>
0 siblings, 0 replies; 3+ messages in thread
From: Mark R. Dingee @ 2006-10-11 11:02 UTC (permalink / raw)
To: Jim C. Nasby <jim@nasby.net>; +Cc: pgsql-sql
Thanks, Jim. I'll give it a try.
On Tue, 2006-10-10 at 21:11 -0500, Jim C. Nasby wrote:
> On Tue, Oct 10, 2006 at 03:21:36PM -0400, mark.dingee@cox.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).
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2006-10-11 11:02 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-10-10 19:21 Temp tables and functions mark.dingee@cox.net
2006-10-11 02:11 ` Jim C. Nasby <jim@nasby.net>
2006-10-11 11:02 ` Mark R. Dingee <mark.dingee@cox.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox