Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 54A66632246 for ; Mon, 16 Mar 2009 20:34:44 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 75360-02 for ; Mon, 16 Mar 2009 20:34:34 -0300 (ADT) X-Greylist: delayed 00:21:22.842193 by SQLgrey-1.7.6 Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.28]) by mail.postgresql.org (Postfix) with ESMTP id 59F466310AC for ; Mon, 16 Mar 2009 20:34:41 -0300 (ADT) Received: by yx-out-2324.google.com with SMTP id 3so1808828yxj.73 for ; Mon, 16 Mar 2009 16:34:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.150.218.10 with SMTP id q10mr9219164ybg.28.1237245196757; Mon, 16 Mar 2009 16:13:16 -0700 (PDT) In-Reply-To: References: Date: Mon, 16 Mar 2009 19:13:16 -0400 Message-ID: <9c7ce58a0903161613m1bf644a2te4efc5a5680abb76@mail.gmail.com> Subject: Re: select into... From: Fernando Arancibia To: Tena Sakai Cc: pgsql-admin@postgresql.org Content-Type: multipart/alternative; boundary=000e0cd4050c73edc90465449830 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200903/181 X-Sequence-Number: 31681 --000e0cd4050c73edc90465449830 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi, try insert into my_table select * from old_table where (some_condition); bye Fernando. 2009/3/16 Tena Sakai > 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? > > Thank you in advance. > > Regards, > > Tena Sakai > tsakai@gallo.ucsf.edu > > --000e0cd4050c73edc90465449830 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi, try

insert into=A0my_table select * from=A0old_table= =A0where (some_condition);

bye=A0
Fernan= do.

2009/3/16 Tena Sakai <tsakai@gallo.ucsf.edu>= ;

Hi Everybody,

I want to execute a query below:

=A0 select *
=A0=A0=A0 into my_table
=A0=A0=A0 from old_table
=A0=A0 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.=A0 Is there any way to
get postgres to do what I want done?

Thank you in advance.

Regards,

Tena Sakai
tsakai@gallo.ucs= f.edu


--000e0cd4050c73edc90465449830--