From: | "Jaime Casanova" <systemguards(at)gmail(dot)com> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "David Goodenough" <david(dot)goodenough(at)btconnect(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: SELECT INTO TEMPORARY problem |
Date: | 2007-01-19 03:52:46 |
Message-ID: | c2d9e70e0701181952ne795501tb0cad28394aad96b@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 1/17/07, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> David Goodenough <david(dot)goodenough(at)btconnect(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | A.M. | 2007-01-19 04:13:00 | Re: PostgreSQL and embedded PC with Compact Flash? |
Previous Message | Paul Lambert | 2007-01-19 03:46:52 | Installing Postegres side-by-side with M$ SQL server |