Re: idea: global temp tables

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: idea: global temp tables
Дата
Msg-id 162867790904272044i9396e92m3a0dad047ebaec36@mail.gmail.com
обсуждение исходный текст
Ответ на Re: idea: global temp tables  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
2009/4/27 Andrew Dunstan <andrew@dunslane.net>:
>
>
> Kevin Grittner wrote:
>>
>> Pavel Stehule <pavel.stehule@gmail.com> wrote:
>>>
>>> I am thinking about global temp tables.
>>>
>>
>>  These would have some value to us.
>>  In case anyone doesn't know, this is a feature in the SQL standard. You
>> have a permanent definition of the schema, but the table is
>> materialized as a temporary table on reference by any connection.
>>  I can't speak to the practicality of the proposed implementation
>> techniques.
>>
>>
>
> Using a global table to achieve schema-persistent temp tables seems like a
> horrid hack - what would you do if the table used a type other than a
> standard built-in type?

Where is a problem? - there is normal dependency between types and
relation. Of course, ALTER TABLE have to be little bit different - a)
should be done, when no table is used, b) should be done only on all
temporary tables. But this technique do minimal changes in pg internal
structure. The core of problem is structure of pg_class table, that
contains possibly shared and not shared fields between global tables.
So implementation needs a) significant change of pg_class table OR b)
using some transparent table overloading

One year ago I though about some memory tables for it. But it is too
different and now, when VACUUM should be effective I thing, it is
needless.

>
> Or perhaps Pavel doesn't really mean "global" as the term is used in
> Postgres (c.f. the pg_database table)?
>

no, I though global tables in sense of SQL standard. What do you thing
are shared tables (in pg terminology)

regards
Pavel Stehule

> cheers
>
> andrew
>


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

Предыдущее
От: "A.M."
Дата:
Сообщение: Re: idea: global temp tables
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: idea: global temp tables