Re: [GENERAL] Means to emulate global temporary table

Поиск
Список
Период
Сортировка
От George Neuner
Тема Re: [GENERAL] Means to emulate global temporary table
Дата
Msg-id 8ide7ct3po2v420pelef0kbahe6e5q09fu@4ax.com
обсуждение исходный текст
Ответ на [GENERAL] Means to emulate global temporary table  (Ian Lewis <ilewismsl@gmail.com>)
Ответы Re: [GENERAL] Means to emulate global temporary table  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general
On Wed, 11 Jan 2017 15:23:10 -0800, John R Pierce
<pierce@hogranch.com> wrote:

>On 1/11/2017 2:07 PM, Ian Lewis wrote:
>> I am working on porting from an SQL Anywhere server that has support
>> for general temporary tables. It appears that PostgreSQL does not have
>> such support.
>
>postgres temporary tables are either local to a transaction, or to a
>connection/session, and are automatically deleted when the transaction
>or session terminates.
>
>how do these 'general temporary tables' differ from regular tables that
>you create on demand, then delete when you're done with them?

SQL Anywhere has a couple of interesting twists on temporary tables.

First, it allows temporary tables to be defined as part of the
database schema, and to have them implicitly instantiated upon the
first mention in a session.  It is not necessary to issue a "create"
call before using the table.

Second, it allows temporary tables to be _per_user_ ("global") in
addition to per connection ("local").  Global temp tables are shared
by simultaneous connections from the same user - once created they
persist until the last connection by the owning user is closed.

George

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

Предыдущее
От: Andreas Joseph Krogh
Дата:
Сообщение: Re: [GENERAL] Question slow query
Следующее
От: Karsten Hilbert
Дата:
Сообщение: Re: [GENERAL] Means to emulate global temporary table