X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 035949DD592 for ; Thu, 1 Dec 2005 11:32:08 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 40413-05 for ; Thu, 1 Dec 2005 11:32:02 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id C18FD9DCCB8 for ; Thu, 1 Dec 2005 11:32:04 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id jB1FW8QC010996; Thu, 1 Dec 2005 10:32:08 -0500 (EST) To: Mark Fenbers cc: PostgreSQL - SQL Subject: Re: APPEND INTO? In-reply-to: <438F074A.3040004@noaa.gov> References: <438F074A.3040004@noaa.gov> Comments: In-reply-to Mark Fenbers message dated "Thu, 01 Dec 2005 09:23:06 -0500" Date: Thu, 01 Dec 2005 10:32:08 -0500 Message-ID: <10995.1133451128@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[UPPERCASE_25_50=0] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200512/3 X-Sequence-Number: 23545 Mark Fenbers writes: > I want to SELECT INTO mytable WHERE (criteria are met), except that I > want to APPEND into an existing table the rows that are selected, > instead of creating a new table (which SELECT INTO will do). How can > this be done? INSERT INTO foo SELECT whatever regards, tom lane