pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: Roy Souther <roy@silicontao.com>
To: pgsql-sql@postgresql.org
Subject: Re: SELECT * INTO TABLE is not working for me.
Date: Thu, 31 May 2001 11:52:48 +0100
Message-ID: <007e01c0e9bf$d6444e80$1001a8c0@archonet.com> (raw)
References: <0105301102010Q.28903@OlympusMons>

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 Smith
 5 | Andrea Ottwick
(2 rows)

- Richard Huxton




view thread (3+ messages)

Message-ID: <007e01c0e9bf$d6444e80$1001a8c0@archonet.com>
Permalink:  ../007e01c0e9bf$d6444e80$1001a8c0@archonet.com/
Also on:    postgresql.org/message-id/007e01c0e9bf$d6444e80$1001a8c0@archonet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: dev@archonet.com, roy@silicontao.com
  Subject: Re: SELECT * INTO TABLE is not working for me.
  In-Reply-To: <007e01c0e9bf$d6444e80$1001a8c0@archonet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox