pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Marlowe <scott.marlowe@gmail.com>
To: Tena Sakai <tsakai@gallo.ucsf.edu>
Cc: pgsql-admin@postgresql.org
Subject: Re: select into...
Date: Mon, 16 Mar 2009 17:12:05 -0600
Message-ID: <dcc563d10903161612t4ee3fe37k776764ecfc7dbed4@mail.gmail.com> (raw)
In-Reply-To: <FE44E0D7EAD2ED4BB2165071DB8E328C0378F7E6@egcrc-ex01.egcrc.org>
References: <FE44E0D7EAD2ED4BB2165071DB8E328C0378F7E6@egcrc-ex01.egcrc.org>

On Mon, Mar 16, 2009 at 5:08 PM, Tena Sakai <tsakai@gallo.ucsf.edu> wrote:
> Hi Everybody,
>
> I want to execute a query below:
>
>   select *
>     into my_table
>     from old_table
>    where (some_condition);
>
> The trouble is that the manual page states that this would
> "SELECT INTO creates a new table and fills it with data
> computed by a query."
>
> What I want is to append my_table.  Is there any way to
> get postgres to do what I want done?

You want insert:

insert into my_table select yada from old_table;



view thread (6+ messages)  latest in thread

Message-ID: <dcc563d10903161612t4ee3fe37k776764ecfc7dbed4@mail.gmail.com>
Permalink:  ../dcc563d10903161612t4ee3fe37k776764ecfc7dbed4@mail.gmail.com/
Also on:    postgresql.org/message-id/dcc563d10903161612t4ee3fe37k776764ecfc7dbed4@mail.gmail.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-admin@postgresql.org
  Cc: scott.marlowe@gmail.com, tsakai@gallo.ucsf.edu
  Subject: Re: select into...
  In-Reply-To: <dcc563d10903161612t4ee3fe37k776764ecfc7dbed4@mail.gmail.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