Re: temporary views

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: temporary views
Дата
Msg-id Pine.LNX.4.30.0110070033320.871-100000@peter.localdomain
обсуждение исходный текст
Ответ на Re: temporary views  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: temporary views  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
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



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

Предыдущее
От: Masaru Sugawara
Дата:
Сообщение: Re: challenging query
Следующее
От: "Aasmund Midttun Godal"
Дата:
Сообщение: PlPerl