pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter_e@gmx.net>
To: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: Tomasz Myrta <jasiek@lamer.pl>
Cc: pgsql-sql@postgresql.org
Subject: Re: temporary views
Date: Sun, 7 Oct 2001 19:54:06 +0200 (CEST)
Message-ID: <Pine.LNX.4.30.0110070033320.871-100000@peter.localdomain> (raw)
In-Reply-To: <200110052042.f95KgwZ22912@candle.pha.pa.us>

Bruce Momjian writes:

> Seems like a TODO item, at least.  What we could do is to create views
> as TEMP if they use temp tables and drop the view as soon as the session
> ends .  You of course would have to recreate the view each time but
> because it is a _temp_ view, it could be done reliably by multiple
> backends at the same time.

SQL requires that no table in a view declaration be a temporary table.

> Added to TODO:
>
> 	* Allow views on temporary tables to behave as temporary views

I don't think this is a good idea.  Especially since our temp tables are
allowed to shadow persistent tables, it would not be obvious whether the
view you're creating with any given statement will become persistent or
temporary.

I think an explicit CREATE TEMPORARY VIEW command would be fair and safe,
but until that is done we should probably concentrate on the SQL standard
behaviour.

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter




view thread (10+ messages)  latest in thread

Message-ID: <Pine.LNX.4.30.0110070033320.871-100000@peter.localdomain>
Permalink:  ../Pine.LNX.4.30.0110070033320.871-100000@peter.localdomain/
Also on:    postgresql.org/message-id/Pine.LNX.4.30.0110070033320.871-100000@peter.localdomain

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: peter_e@gmx.net, pgman@candle.pha.pa.us, jasiek@lamer.pl
  Subject: Re: temporary views
  In-Reply-To: <Pine.LNX.4.30.0110070033320.871-100000@peter.localdomain>
  References: <200110052042.f95KgwZ22912@candle.pha.pa.us> <Pine.LNX.4.30.0110070033320.871-100000@peter.localdomain>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox