Yasir --

You wrote:
<snip>
>If I generate a temporary table instead of returning the results how
>long will that table exist for?  Excuse the OOP terminology but would
>it be correct to create a 'Singleton' to access the temporary table,
>where if it exists and is less than 30 minutes old use that one,
>otherwise drop the table and recreate it?

In 8.0:
"Temporary tables are automatically dropped at the end of a session, or 
optionally at the end of the current transaction (see ON COMMIT below).
Existing permanent tables with the same name are not visible to the current 
session while the temporary table exists, unless they are referenced with 
schema-qualified names. Any indexes created on a temporary table are 
automatically temporary as well."

So a temp table would persist as long as the originating session, but only that 
session could see it.

Not sure if this helps or not ...

Greg Williamson
DBA
GlobeXplorer LLC



---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

Reply via email to