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 76DA69DCC33 for ; Thu, 1 Dec 2005 11:32:03 -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 42948-03 for ; Thu, 1 Dec 2005 11:31:57 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.194]) by postgresql.org (Postfix) with ESMTP id 42AC19DCAB5 for ; Thu, 1 Dec 2005 11:31:59 -0400 (AST) Received: by wproxy.gmail.com with SMTP id i23so249598wra for ; Thu, 01 Dec 2005 07:32:02 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=AR4Ugq5hYG4HUNu7i7UYNwfXZk6n9uHTrrx6DF6qeP1YUA+tIHCp0SP9xPRAniTQk/L1oS8PoTRpEFdZuVmIVXvKAE1G6lR+oWzkC4LcU7TwDBLxzxAjp1PCnY9HjB8GwLqCaSo6UoN6XpBbm++z4NDCqa+hBBCqpgCfWA0eTKY= Received: by 10.65.189.16 with SMTP id r16mr885722qbp; Thu, 01 Dec 2005 07:32:02 -0800 (PST) Received: by 10.65.180.14 with HTTP; Thu, 1 Dec 2005 07:32:02 -0800 (PST) Message-ID: Date: Thu, 1 Dec 2005 10:32:02 -0500 From: Jaime Casanova To: Mark Fenbers Subject: Re: APPEND INTO? Cc: PostgreSQL - SQL In-Reply-To: <438F074A.3040004@noaa.gov> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <438F074A.3040004@noaa.gov> 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/2 X-Sequence-Number: 23544 On 12/1/05, Mark Fenbers wrote: > 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? > > (Is this what the "FOR UPDATE OF tablename" clause is for?) > > Mark > INSERT INTO table SELECT .... -- regards, Jaime Casanova (DBA: DataBase Aniquilator ;)