Re: views on temp tables

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: views on temp tables
Дата
Msg-id 200203242235.g2OMZFV05074@candle.pha.pa.us
обсуждение исходный текст
Ответ на views on temp tables  (Neil Conway <nconway@klamath.dyndns.org>)
Список pgsql-hackers
Neil Conway wrote:
> I was browsing through SQL92 and I noticed this, when discussing the
> CREATE VIEW syntax:
> 
> "5) Any <table name> that is specified in the <query expression> shall
> be different from the <table name> of any <temporary table
> declaration>."
> 
> (<query expression> is the defintion of the view. This basically says
> that you're not allowed to create views on temp tables.)
> 
> 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?

Clearly not optimal.  TODO has:
* Allow temporary views

My idea would be to make any view temporary that relies on a temp table
--- throw a NOTICE to the user when they create it so they know it is
temporary.  We could allow TEMP on CREATE VIEW but there seems little
reason for that, though we could allow TEMP views on real tables, so I
guess we would need that option too.

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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Neil Conway
Дата:
Сообщение: views on temp tables
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Configuring for 64-bit integer date/time storage?