Re: how does a temp table work?

Lists: pgsql-general
From: Joshua N Pritikin <jpritikin(at)pobox(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: how does a temp table work?
Date: 2007-07-11 16:58:25
Message-ID: 20070711165825.GA20625@always.joy.eth.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

I read the docs but I'm still not sure. If I create a temp table with ON
COMMIT DROP then is that table private to the transaction? In other
words, if the temp table is created in plpgsql stored procedure "foo"
and foo is executed from different transactions in parallel then each
transaction will see its own private temp table, right?

--
Make April 15 just another day, visit http://fairtax.org


From: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: how does a temp table work?
Date: 2007-07-11 17:06:22
Message-ID: 20070711170622.GZ1241@phlogiston.dyndns.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Wed, Jul 11, 2007 at 10:28:25PM +0530, Joshua N Pritikin wrote:
> and foo is executed from different transactions in parallel then each
> transaction will see its own private temp table, right?

They will see their own private temp tables _no matter what_.
There's no "shared temp table" support in Postgres.

A

--
Andrew Sullivan | ajs(at)crankycanuck(dot)ca
Everything that happens in the world happens at some place.
--Jane Jacobs


From: Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: how does a temp table work?
Date: 2007-07-11 19:36:54
Message-ID: 46953156.4060902@cox.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On 07/11/07 12:06, Andrew Sullivan wrote:
> On Wed, Jul 11, 2007 at 10:28:25PM +0530, Joshua N Pritikin wrote:
>> and foo is executed from different transactions in parallel then each
>> transaction will see its own private temp table, right?
>
> They will see their own private temp tables _no matter what_.
> There's no "shared temp table" support in Postgres.

Will GLOBAL TEMP tables be added any time soon?

I know the docs say that the standards implies needing modules, but
"shared definition" is really handy. We use regularly such GLOBAL
TEMP tables without modules.

--
Ron Johnson, Jr.
Jefferson LA USA

Give a man a fish, and he eats for a day.
Hit him with a fish, and he goes away for good!


From: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: how does a temp table work?
Date: 2007-07-11 20:56:59
Message-ID: 20070711205659.GF2424@phlogiston.dyndns.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Wed, Jul 11, 2007 at 02:36:54PM -0500, Ron Johnson wrote:
>
> Will GLOBAL TEMP tables be added any time soon?

I think there's a recent thread/bunfight about this topic on
-hackers. You may want to draw your own conclusions on the basis of
what you see there -- I'm not willing to speculate :)

A

--
Andrew Sullivan | ajs(at)crankycanuck(dot)ca
A certain description of men are for getting out of debt, yet are
against all taxes for raising money to pay it off.
--Alexander Hamilton