temp tables in functions? - Mailing list pgsql-general

From jws
Subject temp tables in functions?
Date
Msg-id 1170909609.908314.91930@q2g2000cwa.googlegroups.com
Whole thread Raw
Responses Re: temp tables in functions?  (Bruno Wolff III <bruno@wolff.to>)
List pgsql-general
Having developed a complex query, I want to wrap it up as a function
so that it can take a parameter and return a set of rows. This query
is currently written as multiple sql statements that create a few
interstitial temp tables that are then joined. If I put this into a
function definition, do those temp tables get dropped automatically
when the function returns?

My alternative is to re-write the query as a self joins and
subqueries. I can do that, but it's somewhat less readable.


pgsql-general by date:

Previous
From: "jws"
Date:
Subject: Re: 'greatest' function?
Next
From: roopa perumalraja
Date:
Subject: Re: Storing database in cluster (Memory)