Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bnCN4-0000xR-SN for pgsql-sql@arkaria.postgresql.org; Thu, 22 Sep 2016 22:21:34 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bnCN3-00046M-JE for pgsql-sql@arkaria.postgresql.org; Thu, 22 Sep 2016 22:21:33 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bnCN1-00044t-Sw for pgsql-sql@postgresql.org; Thu, 22 Sep 2016 22:21:32 +0000 Received: from [195.159.176.226] (helo=blaine.gmane.org) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bnCMz-0003kx-2g for pgsql-sql@postgresql.org; Thu, 22 Sep 2016 22:21:30 +0000 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1bnCMg-0005vy-B8 for pgsql-sql@postgresql.org; Fri, 23 Sep 2016 00:21:10 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-sql@postgresql.org From: Thomas Kellerer Subject: Re: insert values from a ROW object Date: Fri, 23 Sep 2016 00:20:22 +0200 Lines: 21 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@blaine.gmane.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.5.666 In-Reply-To: X-Host-Lookup-Failed: Reverse DNS lookup failed for 195.159.176.226 (failed) X-Pg-Spam-Score: 0.3 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org Michael Moore schrieb am 22.09.2016 um 23:42: > for a in select * from temp_rslt > loop > insert into final_rslt select row(a.*); > end loop; > > I want to do something like the above. I don't want to have to name each 'a.' variable. > Is it possible? > No need for a loop: insert into final_rsl select * from tmp_rslt; This assumes that both table define the columns in the exact same order -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql