Re: views on temp tables

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Neil Conway <nconway(at)klamath(dot)dyndns(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: views on temp tables
Date: 2002-03-25 20:55:28
Message-ID: 200203252055.g2PKtSI14603@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Neil Conway <nconway(at)klamath(dot)dyndns(dot)org> writes:
> > Currently, PostgreSQL allows this -- when the session ends and the temp
> > table is dropped, an subsequent queries on the view fail. Is this the
> > optimal behavior?
>
> Well, I think it's better than refusing views on temp tables, as the
> spec would have us do.
>
> The "correct" behavior is probably to drop such views on backend exit.
> Possibly we should invent the notion of temp views, and disallow
> references from non-temp views to temp tables. That seems like it
> might be less likely to cause unpleasant surprises than just silently
> dropping views that reference temp tables.

TODO updated with:

* Allow temporary views
* Require view using temporary tables to be temporary views

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ulrich Neumann 2002-03-25 21:50:00 Patch for xlog.c
Previous Message Tom Lane 2002-03-25 18:35:34 Re: pg_control contents