Re: idea: global temp tables

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Peter Eisentraut" <peter_e(at)gmx(dot)net>, <pgsql-hackers(at)postgresql(dot)org>
Cc: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: idea: global temp tables
Date: 2009-04-29 14:13:25
Message-ID: 49F81A35.EE98.0025.0@wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:

> There are actually two orthogonal properties at work here: How the
> table is visible with respect to modules (LOCAL/GLOBAL) and whether
> the table disappears at the end of the session (currently yes,
> proposed new behavior optionally no).

Pavel's request and the standard always have the temporary table
disappearing at the end of the session; the second question for these
is whether the *definition* of the table disappears at the end of the
session, or remains in the schema to generate an instance for another
session on demand.

There was a digression about a possible feature other than what Pavel
requested, which is not defined in the standard, which I referred to
as "permanent work tables", which would be distinguished from normal
tables only by the fact that no effort would be made to log the data
for recovery, and perhaps the table should be truncated on PostgreSQL
startup. If we want to pursue that discussion, it should probably be
on a different thread.

> On the matter of LOCAL/GLOBAL, I think the correct thing to do is to
> reject LOCAL and accept GLOBAL as equivalent to the default.

+1

> And then invent a separate setting, say EPHEMERAL/PERSISTENT that
> controls the behavior that Pavel requested.

While I probably wouldn't have chosen the syntax that the standard
did, the SQL spec does specify a syntax to do what Pavel requested.
I don't think it's so bad that we should ignore it and invent our own
alternative.

-Kevin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2009-04-29 14:21:54 Re: idea: global temp tables
Previous Message Dimitri Fontaine 2009-04-29 13:43:44 Documentation: GiST extension implementation