Re: SELECT INTO TEMPORARY problem

Поиск
Список
Период
Сортировка
От Jaime Casanova
Тема Re: SELECT INTO TEMPORARY problem
Дата
Msg-id c2d9e70e0701181952ne795501tb0cad28394aad96b@mail.gmail.com
обсуждение исходный текст
Ответ на Re: SELECT INTO TEMPORARY problem  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On 1/17/07, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 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
>

IIRC, you can do it using CREATE TEMP TABLE t1 ON COMMIT DROP AS query
but i think this new in 8.2

why not extending this to SELECT INTO TEMP?

--
regards,
Jaime Casanova

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs and the universe trying
to produce bigger and better idiots.
So far, the universe is winning."
                                       Richard Cook

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

Предыдущее
От: Ron Peterson
Дата:
Сообщение: octet string type contribution
Следующее
От: "A.M."
Дата:
Сообщение: Re: PostgreSQL and embedded PC with Compact Flash?