Received: from moutvdom01.kundenserver.de (moutvdom01.kundenserver.de [195.20.224.200]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f97Hmkn72125 for ; Sun, 7 Oct 2001 13:48:47 -0400 (EDT) (envelope-from peter_e@gmx.net) Received: from [195.20.224.209] (helo=mrvdom02.schlund.de) by moutvdom01.kundenserver.de with esmtp (Exim 2.12 #2) id 15qI2c-0004fX-00; Sun, 7 Oct 2001 19:48:42 +0200 Received: from p3e9e6fc1.dip0.t-ipconnect.de ([62.158.111.193]) by mrvdom02.schlund.de with esmtp (Exim 2.12 #2) id 15qI2b-0006kU-00; Sun, 7 Oct 2001 19:48:41 +0200 Date: Sun, 7 Oct 2001 19:54:06 +0200 (CEST) From: Peter Eisentraut X-Sender: To: Bruce Momjian cc: Tomasz Myrta , Subject: Re: temporary views In-Reply-To: <200110052042.f95KgwZ22912@candle.pha.pa.us> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200110/102 X-Sequence-Number: 5057 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