Re: SELECT * INTO TABLE is not working for me. - Mailing list pgsql-sql

From Richard Huxton
Subject Re: SELECT * INTO TABLE is not working for me.
Date
Msg-id 007e01c0e9bf$d6444e80$1001a8c0@archonet.com
Whole thread Raw
In response to SELECT * INTO TABLE is not working for me.  (Roy Souther <roy@silicontao.com>)
List pgsql-sql
From: "Roy Souther" <roy@silicontao.com>

> I am testing my SQL commands in pgaccess before I put them into my C++
code.
> Trying to copy a table using...
> SELECT * INTO TABLE copy_stuff FROM the_stuff
>
> It creates the view but no table called copy_stuff exists after I run it.
Why?
> I can use...
> CREATE TABLE copy_stuff AS SELECT * FROM the_stuff
> that works and makes a new table, but it causes other problems with the
> clients that this app is running from. I would like to make the SELECT *
INTO
> work. Any idea?

Works here - can you give version info etc?

richardh=> select * into table foo2 from foo;
SELECT
richardh=> select * from foo2;a |                b
---+----------------------------------4 | Jack Smith5 | Andrea Ottwick
(2 rows)

- Richard Huxton



pgsql-sql by date:

Previous
From: "Koen Antonissen"
Date:
Subject: RE: primary key scans in sequence
Next
From: "datactrl"
Date:
Subject: question about PL/pgSQL function