Re: temp tables ORACLE/PGSQL

From: Pavel Stehule <stehule(at)kix(dot)fsv(dot)cvut(dot)cz>
To: NO-fisher-SPAM_PLEASE <fisher73(at)gazeta(dot)pl>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: temp tables ORACLE/PGSQL
Date: 2005-04-28 17:44:44
Message-ID: Pine.LNX.4.44.0504281936380.22687-100000@kix.fsv.cvut.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> Hi
> I used to work with Oracle and now tryin' PostgreSQL I'm a bit
> confused.
> I found that creating temp table in one session does not make it
> available for other sessions for the same user? Is this intended??

Yes, it's natural behave of temp. tables in PostgreSQL. The life cycle of
temp tables is related with session. When session ends then all temp
tables are destroyed. When you wont to use temp tables again, you have to
create it again.

> I was tryin to use because of lack of session and package variables in
> PGSQL (thats what I know). But I'm not sure if I have to create a
> temp table at the beginning of each session? Or just like in Oracle
> create temp table definition and all whats temporar is data.

You will lost table definition.

>
> If creating a temp table for each connection is a must then maybe You
> can tell me if there is any triger /event that is being called during
> connecting to db. I guess that would be the best place to create temp
> tables and feed it up with session parameters.

No there are not table or session triggers. You have to create temp tables
from application.

Regards
Pavel Stehule

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Simon Windsor 2005-04-28 18:00:26 OT: phpPgAdmin
Previous Message John D. Burger 2005-04-28 17:39:51 Re: ERROR: Could not convert UTF-8 to ISO8859-1