Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 5643F9FB2F4 for ; Tue, 10 Oct 2006 16:21:55 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 28002-02 for ; Tue, 10 Oct 2006 19:21:40 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from eastrmmtao02.cox.net (eastrmmtao02.cox.net [68.230.240.37]) by postgresql.org (Postfix) with ESMTP id 79ADF9FB25A for ; Tue, 10 Oct 2006 16:21:37 -0300 (ADT) Received: from eastrmwml06.mgt.cox.net ([172.18.52.67]) by eastrmmtao02.cox.net (InterMail vM.6.01.06.01 201-2131-130-101-20060113) with ESMTP id <20061010192137.UVVQ10599.eastrmmtao02.cox.net@eastrmwml06.mgt.cox.net> for ; Tue, 10 Oct 2006 15:21:37 -0400 Message-ID: <398587.1160508096610.JavaMail.root@eastrmwml06.mgt.cox.net> Date: Tue, 10 Oct 2006 15:21:36 -0400 From: To: pgsql-sql@postgresql.org Subject: Temp tables and functions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) Sensitivity: Normal X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.961 tagged_above=0 required=5 tests=NO_REAL_NAME X-Spam-Level: X-Archive-Number: 200610/101 X-Sequence-Number: 26490 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