On Thu, Jan 25, 2007 at 03:39:14PM +0100, Mario Splivalo wrote:
> When I try to use TEMPORARY TABLE within postgres functions (using 'sql'
> as a function language), I can't because postgres can't find that
> temporary table. Consider this example:

You need to build the temp table and EXECUTE the statement.  The
problem is that the plan is cached for later re-use.  Since the
cached plan has the id of a table that no longer exists, you get this
error.  See the PL/pgSQL part of the manual for more on this.

A

-- 
Andrew Sullivan  | [EMAIL PROTECTED]
Unfortunately reformatting the Internet is a little more painful 
than reformatting your hard drive when it gets out of whack.
                --Scott Morris

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [EMAIL PROTECTED] so that your
       message can get through to the mailing list cleanly

Reply via email to