Re: SELECT INTO TEMPORARY problem

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: SELECT INTO TEMPORARY problem
Дата
Msg-id 22611.1169052517@sss.pgh.pa.us
обсуждение исходный текст
Ответ на SELECT INTO TEMPORARY problem  (David Goodenough <david.goodenough@btconnect.com>)
Ответы Re: SELECT INTO TEMPORARY problem  ("Jaime Casanova" <systemguards@gmail.com>)
Список pgsql-general
David Goodenough <david.goodenough@btconnect.com> writes:
> In one of the requests I do a SELECT ... INTO TEMPORARY t1 ..., which
> works just fine when I first use it, but from then on it objects saying
> that t1 already exists.  When I read the documentation (8.1 as that is
> what I am using) I thought I understood that the table would disappear
> at the end of the transaction.

No, the default is to last until end of session.

There's an ON COMMIT DROP option in the CREATE TEMP TABLE syntax,
but I don't think it's possible to stick it into an INTO TEMP clause.

            regards, tom lane

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

Предыдущее
От: Csaba Nagy
Дата:
Сообщение: Re: Index bloat of 4x
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: SELECT INTO TEMPORARY problem