Hi all,
I think the title says everything:-)
I just what a way to create a TEMP for the current transaction only.
If possible I don't want to create the TEMP table first, specify all
column types, etc.
CREATE TEMP TABLE _T_CR1 AS
SELECT CRNUM, CRYPNUM, CRMONT, CRDATE, GLNUM, CRRRNUM,
David Gagnon wrote:
I just what a way to create a TEMP for the current transaction only.
If possible I don't want to create the TEMP table first, specify all
column types, etc.
Well, you can get half way there with SELECT ... INTO TEMPORARY TABLE
tablename, eg:
SELECT 1 AS n, TEXT
Quoting Craig Ringer [EMAIL PROTECTED]:
David Gagnon wrote:
I just what a way to create a TEMP for the current transaction
only. If possible I don't want to create the TEMP table first,
specify all column types, etc.
Well, you can get half way there with SELECT ... INTO TEMPORARY
On Thursday 13 March 2008 4:49 am, David Gagnon wrote:
Hi all,
I think the title says everything:-)
I just what a way to create a TEMP for the current transaction only.
If possible I don't want to create the TEMP table first, specify all
column types, etc.
CREATE TEMP TABLE _T_CR1 AS
Adrian Klaver wrote:
On Thursday 13 March 2008 4:49 am, David Gagnon wrote:
Hi all,
I think the title says everything:-)
I just what a way to create a TEMP for the current transaction only.
If possible I don't want to create the TEMP table first, specify all
column types, etc.
CREATE
On Thursday 13 March 2008 2:46 pm, Colin Wetherbee wrote:
Adrian Klaver wrote:
On Thursday 13 March 2008 4:49 am, David Gagnon wrote:
Hi all,
I think the title says everything:-)
I just what a way to create a TEMP for the current transaction only.
If possible I don't want to
Adrian Klaver wrote:
On Thursday 13 March 2008 2:46 pm, Colin Wetherbee wrote:
Adrian Klaver wrote:
On Thursday 13 March 2008 4:49 am, David Gagnon wrote:
Hi all,
I think the title says everything:-)
I just what a way to create a TEMP for the current transaction only.
If possible I
Colin Wetherbee [EMAIL PROTECTED] writes:
Adrian Klaver wrote:
Try CREATE TEMP TABLE foo ON COMMIT DROP AS (SELECT 1 AS a, 2 AS b) ;
I don't know what version the OP is using, but that doesn't work on 8.1:
Seems to be there in 8.2 and up.
regards, tom lane
--
Sent
Tom Lane wrote:
Colin Wetherbee [EMAIL PROTECTED] writes:
Adrian Klaver wrote:
Try CREATE TEMP TABLE foo ON COMMIT DROP AS (SELECT 1 AS a, 2 AS b) ;
I don't know what version the OP is using, but that doesn't work on 8.1:
Seems to be there in 8.2 and up.
In 8.2:
cww=# BEGIN;
BEGIN
Colin Wetherbee wrote:
Tom Lane wrote:
Colin Wetherbee [EMAIL PROTECTED] writes:
Adrian Klaver wrote:
Try CREATE TEMP TABLE foo ON COMMIT DROP AS (SELECT 1 AS a, 2 AS b) ;
I don't know what version the OP is using, but that doesn't work on 8.1:
Seems to be there in 8.2 and up.
In 8.2:
Colin Wetherbee [EMAIL PROTECTED] writes:
Colin Wetherbee wrote:
cww=# CREATE TEMP TABLE foo ON COMMIT DROP AS (SELECT 1 AS a, 2 AS b);
FWIW, the output of \h CREATE TABLE in both 8.1 and 8.2 suggest that
this should be possible.
\h CREATE TABLE AS is what describes this variant ...
Tom Lane wrote:
Colin Wetherbee [EMAIL PROTECTED] writes:
Colin Wetherbee wrote:
cww=# CREATE TEMP TABLE foo ON COMMIT DROP AS (SELECT 1 AS a, 2 AS b);
FWIW, the output of \h CREATE TABLE in both 8.1 and 8.2 suggest that
this should be possible.
\h CREATE TABLE AS is what describes this
12 matches
Mail list logo