Обсуждение: how does a temp table work?

Поиск
Список
Период
Сортировка

how does a temp table work?

От
Joshua N Pritikin
Дата:
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

Re: how does a temp table work?

От
Andrew Sullivan
Дата:
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@crankycanuck.ca
Everything that happens in the world happens at some place.
        --Jane Jacobs

Re: how does a temp table work?

От
Ron Johnson
Дата:
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!


Re: how does a temp table work?

От
Andrew Sullivan
Дата:
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@crankycanuck.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