Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 81F706340FF for ; Mon, 16 Mar 2009 20:12:09 -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 70887-03 for ; Mon, 16 Mar 2009 20:12:01 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qy0-f106.google.com (mail-qy0-f106.google.com [209.85.221.106]) by mail.postgresql.org (Postfix) with ESMTP id A5991633D6A for ; Mon, 16 Mar 2009 20:12:06 -0300 (ADT) Received: by qyk4 with SMTP id 4so1741363qyk.15 for ; Mon, 16 Mar 2009 16:12:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=8P3JNxIPM1fTszZKg5ca7rsMQxu2BeRQUAPqCiWxu5o=; b=Yg/KbG28kSBWjebYJoup0p2jeBe4b4JZDYsMsvJxO+C2AeK/0hZmTEhy95tkZRwk4f ehxnx+pi23jZsJvJHbbshV0+SbHhZzmk/ARV5qdrrmTj/K9NpXyUKJWAGFy19sFrKRsq 97C2wvxcJA+KfOBW6l42TEijpLVKwYOxHqWcE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=QUuDz79P/ifdn6zxPfMUCnWk4y70Lcj22WqKJfqeSuP2n/VCnaCwf3l972rbxPKe9d Qw9oJrBiRUEizvRTpg1/M3ZmXDnIZBcAnmJhM6xTRqHRXmM21HU4wTEee0xOR9IIYM5G D2bGT0CLMPWSDPiHDMVYmI00iVcosOVecfUG0= MIME-Version: 1.0 Received: by 10.224.54.76 with SMTP id p12mr6498037qag.101.1237245125359; Mon, 16 Mar 2009 16:12:05 -0700 (PDT) In-Reply-To: References: Date: Mon, 16 Mar 2009 17:12:05 -0600 Message-ID: Subject: Re: select into... From: Scott Marlowe To: Tena Sakai Cc: pgsql-admin@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200903/177 X-Sequence-Number: 31677 On Mon, Mar 16, 2009 at 5:08 PM, Tena Sakai wrote: > 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? You want insert: insert into my_table select yada from old_table;