Re: select into...

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Tena Sakai <tsakai(at)gallo(dot)ucsf(dot)edu>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: select into...
Date: 2009-03-16 23:12:05
Message-ID: dcc563d10903161612t4ee3fe37k776764ecfc7dbed4@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Mon, Mar 16, 2009 at 5:08 PM, Tena Sakai <tsakai(at)gallo(dot)ucsf(dot)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;

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Kevin Grittner 2009-03-16 23:13:07 Re: select into...
Previous Message Tena Sakai 2009-03-16 23:08:48 select into...