Re: [HACKERS] Non-standard feature request

From: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>
To: pgsql-patches(at)postgresql(dot)org
Cc: pgsql-hackers(at)postgresql(dot)org, Mike Mascari <mascarm(at)mascari(dot)com>
Subject: Re: [HACKERS] Non-standard feature request
Date: 2002-06-27 16:17:47
Message-ID: Pine.LNX.4.21.0206280216180.26102-101000@linuxworld.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Slight bug in the previous patch. Logically (and according to SQL99's
treatment of ON COMMIT), it can be specified only for CREATE TEMP
TABLE. The patch throws an error if only CREATE TABLE has been specified.

Gavin

On Fri, 28 Jun 2002, Gavin Sherry wrote:

> On Fri, 14 Jun 2002, Gavin Sherry wrote:
>
> > On Thu, 13 Jun 2002, Mike Mascari wrote:
> >
> > >
> > > CREATE TEMPORARY TABLE
> > > ...
> > > ON COMMIT DROP;
> > >
> > > pseudo-compatible with the SQL-standard of:
> > >
> > > ON COMMIT { DELETE | PRESERVE } ROWS;
> > >
> > > so one day PostgreSQL's grammar would look like:
> > >
> > > ...
> > > ON COMMIT { DROP | { DELETE | PRESERVE } ROWS };
> >
> > I think this is a pretty useful feature. Shouldn't require too much
> > work. A new relkind or a bool in TempTable and a little code in
> > AtEOXact_temp_relations() to heap_drop_with_catalog() the registered temp
> > table.
> >
> > Anyone else keen for this feature?
>
> Attached is a patch implementing this. The patch is against 7.2.1
> source. The grammar introduced is of the form:
>
> CREATE TEMP TABLE ... ON COMMIT DROP;
>
> Is this a desirable feature? Seems pretty useful to me.
>
> Gavin
>
>

Attachment Content-Type Size
temprel2.diff.gz application/x-gzip 4.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mike Mascari 2002-06-27 16:26:36 Re: Non-standard feature request
Previous Message Josh Berkus 2002-06-27 16:07:30 Re: [HACKERS] Support (was: Democracy and organisation)

Browse pgsql-patches by date

  From Date Subject
Next Message Mike Mascari 2002-06-27 16:26:36 Re: Non-standard feature request
Previous Message Gavin Sherry 2002-06-27 15:52:56 Re: [HACKERS] Non-standard feature request